[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 13:16:13 PDT 2024
cjappl wrote:
There are 3 errors I see:
Mostly it's this `llvm_gtest` issue:
```
ninja: error: 'compiler-rt/lib/rtsan/tests/llvm_gtest', needed by 'compiler-rt/lib/rtsan/tests/RtsanNoInstTestObjects.rtsan_preinit.cpp.x86_64.o', missing and no known rule to make it
```
On fuchsia it is a parameter type issue:
```
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors.cpp:55:22: error: use of undeclared identifier '__unsanitized_open'; did you mean '__unsanitized_memset'?
55 | const int result = REAL(open)(path, oflag, mode);
| ^~~~~~~~~~
| __unsanitized_memset
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:241:18: note: expanded from macro 'REAL'
241 | # define REAL(x) __unsanitized_##x
| ^
<scratch space>:138:1: note: expanded from here
138 | __unsanitized_open
| ^
/usr/local/fuchsia/sdk/arch/x64/sysroot/include/zircon/sanitizer.h:34:18: note: '__unsanitized_memset' declared here
34 | __typeof(memset) __unsanitized_memset;
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors.cpp:55:33: error: cannot initialize a parameter of type 'void *' with an lvalue of type 'const char *'
55 | const int result = REAL(open)(path, oflag, mode);
| ^~~~
/usr/local/fuchsia/sdk/arch/x64/sysroot/include/zircon/sanitizer.h:34:18: note: passing argument to parameter here
34 | __typeof(memset) __unsanitized_memset;
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors.cpp:69:22: error: use of undeclared identifier '__unsanitized_openat'
69 | const int result = REAL(openat)(fd, path, oflag, mode);
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:241:18: note: expanded from macro 'REAL'
241 | # define REAL(x) __unsanitized_##x
| ^
<scratch space>:141:1: note: expanded from here
141 | __unsanitized_openat
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors.cpp:77:22: error: use of undeclared identifier '__unsanitized_creat'
77 | const int result = REAL(creat)(path, mode);
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:241:18: note: expanded from macro 'REAL'
241 | # define REAL(x) __unsanitized_##x
| ^
<scratch space>:144:1: note: expanded from here
144 | __unsanitized_creat
| ^
Step 6 (build) failure: build (failure)
...
```
On windows (which I think we should just disable support for, for now:
```
C:\b\slave\sanitizer-windows\llvm-project\compiler-rt\lib\rtsan\rtsan_context.cpp(19): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
```
Working to see if I can fix the llvm_gtest issue right now. I would love advice on Fuchsia and disabling rtsan for windows.
https://github.com/llvm/llvm-project/pull/92460
More information about the llvm-commits
mailing list