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);
22
22
23
23
namespace ur_sanitizer_layer {
24
24
25
- bool IsInASanContext () { return __asan_init != nullptr ; }
25
+ bool IsInASanContext () { return ( void *) __asan_init != nullptr ; }
26
26
27
27
static bool ReserveShadowMem (uptr Addr, uptr Size) {
28
28
Size = RoundUpTo (Size, EXEC_PAGESIZE);
@@ -71,15 +71,11 @@ bool DestroyShadowMem() {
71
71
}
72
72
73
73
void *GetMemFunctionPointer (const char *FuncName) {
74
- void *handle = dlopen (LIBC_SO, RTLD_LAZY );
74
+ void *handle = dlopen (LIBC_SO, RTLD_NOLOAD );
75
75
if (!handle) {
76
- return ( void *) nullptr ;
76
+ return nullptr ;
77
77
}
78
- void *ptr = dlsym (handle, FuncName);
79
- if (!ptr) {
80
- return (void *)nullptr ;
81
- }
82
- return ptr;
78
+ return dlsym (handle, FuncName);
83
79
}
84
80
85
81
} // namespace ur_sanitizer_layer
You can’t perform that action at this time.
0 commit comments