This temporary change tells us about all the places where the return
value of the INTERCEPT_FUNCTION macro is actually used. In the next
patch I will cleanup the macro and remove GetRealFuncAddress.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 31009 Build 31008: arc lint + arc unit
Event Timeline
compiler-rt/lib/asan/asan_interceptors.h | ||
---|---|---|
127 | You said this protects against "double interception"? My best guess is that this has been obsolete for a while. | |
134 | Note that this is different from above, it's essentially: (!REAL(name) || !REAL(name)) |
compiler-rt/lib/asan/asan_interceptors.h | ||
---|---|---|
127 | Yes, I would like to put this into INTERCEPT_FUNCTION |
compiler-rt/lib/asan/asan_interceptors.h | ||
---|---|---|
127 | Got it. I will try to make this nicer/more uniform in follow-ups. | |
compiler-rt/lib/interception/interception_linux.h | ||
37 | So the compiler tells me all the places where the return value is used. I want to commit it like this so that the bots compile it for all the configurations that I can't test locally. | |
compiler-rt/lib/msan/msan_interceptors.cc | ||
1247 | It prevents the cleanups in [tsan_interceptors.cc] (see https://reviews.llvm.org/D59504).
|
compiler-rt/trunk/lib/asan/asan_interceptors.h | ||
---|---|---|
125–127 ↗ | (On Diff #196879) | I don't think this change is functionally correct on Windows. The interception mechanism on Windows is based on hotpatching, so the address comparison will always fail. This has created a minor regression in that now any asanified binary run with ASAN_OPTIONS=verbosity=1 emits "failed to intercept *" for every asan-specific interceptor. Checking the reteurn value was the correct thing to do for Windows. I want to revert this, WDYT? |
compiler-rt/trunk/lib/asan/asan_interceptors.h | ||
---|---|---|
125–127 ↗ | (On Diff #196879) | Oh, I forgot about windows that didn't noticed that the check moved from LINUX_OR_FREEBSD into everything. |
compiler-rt/trunk/lib/asan/asan_interceptors.h | ||
---|---|---|
125–127 ↗ | (On Diff #196879) | Can we try to fix this for Windows instead of reverting altogether. I will provide a patch asap. |
compiler-rt/trunk/lib/asan/asan_interceptors.h | ||
---|---|---|
125–127 ↗ | (On Diff #196879) | The revert became rL359611. I can help review any relanding, but I'm not sure why we'd want INTERCEPT_FUNCTION to return void in the first place, it seems best to have some way to signal failure. Interception is inherently quite prone to failure, and a return value seems like the best, most portable way to signal that. |
You said this protects against "double interception"?
If this works as expected, then should we push it up into INTERCEPT_FUNCTION?
Why do we only protect against "double interception" in ASan and MSan, but not the other sanitizers?
My best guess is that this has been obsolete for a while.