File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
source/loader/layers/sanitizer/linux Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ extern "C" __attribute__((weak)) void __asan_init(void);
2222
2323namespace ur_sanitizer_layer {
2424
25- bool IsInASanContext () { return __asan_init != nullptr ; }
25+ bool IsInASanContext () { return ( void *) __asan_init != nullptr ; }
2626
2727static bool ReserveShadowMem (uptr Addr, uptr Size) {
2828 Size = RoundUpTo (Size, EXEC_PAGESIZE);
@@ -71,15 +71,11 @@ bool DestroyShadowMem() {
7171}
7272
7373void *GetMemFunctionPointer (const char *FuncName) {
74- void *handle = dlopen (LIBC_SO, RTLD_LAZY );
74+ void *handle = dlopen (LIBC_SO, RTLD_NOLOAD );
7575 if (!handle) {
76- return ( void *) nullptr ;
76+ return nullptr ;
7777 }
78- void *ptr = dlsym (handle, FuncName);
79- if (!ptr) {
80- return (void *)nullptr ;
81- }
82- return ptr;
78+ return dlsym (handle, FuncName);
8379}
8480
8581} // namespace ur_sanitizer_layer
You can’t perform that action at this time.
0 commit comments