[compiler-rt] [rtsan] Restrict arches and disable android (PR #98268)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 09:03:17 PDT 2024


davidtrevelyan wrote:

A quick update:

1. I can now reproduce the segfault running `Rtsan-aarch64-NoInstTest` by using an `ubuntu:20.04` image with cmake 3.24, but I cannot reproduce the segfault on `ubuntu:latest`. 
2. Trapping the segfault in the debugger, I can see that `dlsym` is segfaulting during the first call to `__interception::InterceptFunction`, which is triggered by the `.preinit_array` when we `INTERCEPT_FUNCTION(calloc);`. The arguments to `dlsym` appear to be OK: `dlsym(RTLD_NEXT, "calloc")`. 

Has anyone seen this sort of thing before? 

Here's my backtrace for reference:

```
* thread #1, name = 'Rtsan-aarch64-N', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x0000000000000000
    frame #1: 0x0000fffff7dd48b4 libdl.so.2`___lldb_unnamed_symbol13$$libdl.so.2 + 236
    frame #2: 0x0000fffff7dd4290 libdl.so.2`dlsym + 104
    frame #3: 0x000000000044ff38 Rtsan-aarch64-NoInstTest`__interception::InterceptFunction(char const*, unsigned long*, unsigned long, unsigned long) at interception_linux.cpp:42:21
    frame #4: 0x000000000044ff34 Rtsan-aarch64-NoInstTest`__interception::InterceptFunction(name="calloc", ptr_to_real=0x00000000004a23c8, func=4517200, trampoline=4517200) at interception_linux.cpp:61
    frame #5: 0x000000000044f9ac Rtsan-aarch64-NoInstTest`__rtsan::InitializeInterceptors() at rtsan_interceptors.cpp:347:3
    frame #6: 0x0000fffff7fdaa3c ld-2.31.so`___lldb_unnamed_symbol57$$ld-2.31.so + 268
```

https://github.com/llvm/llvm-project/pull/98268


More information about the llvm-commits mailing list