aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cpp-compile-test.cpp
diff options
context:
space:
mode:
authorFergus Dall <sidereal@google.com>2021-07-10 00:13:35 +1000
committerDaniel Stone <daniels@collabora.com>2021-07-22 22:27:45 +0000
commit91d98b622f2942221dfe0d7897801a2b0824b825 (patch)
tree0a89e18e29ace4ae2ab6c0ae016f104e36542a9f /tests/cpp-compile-test.cpp
parentconnection-test: Pad out strings with null bytes (diff)
downloadwayland-91d98b622f2942221dfe0d7897801a2b0824b825.tar
wayland-91d98b622f2942221dfe0d7897801a2b0824b825.tar.gz
wayland-91d98b622f2942221dfe0d7897801a2b0824b825.tar.bz2
wayland-91d98b622f2942221dfe0d7897801a2b0824b825.tar.lz
wayland-91d98b622f2942221dfe0d7897801a2b0824b825.tar.xz
wayland-91d98b622f2942221dfe0d7897801a2b0824b825.tar.zst
wayland-91d98b622f2942221dfe0d7897801a2b0824b825.zip
os-wrappers-test: Make syscall intercepts work with sanitizers
Sanitizers need to intercept syscalls in the compiler run-time library, as do these tests. We try to make this work by using dlsym(RTLD_NEXT) to find the next definition in the chain, but here this approach won't work because the compiler run-time library is linked into the same elf object as the test interceptors are. The sanitizer library supports this by giving the intercept functions a prefix and making them only weakly alias the real names, so our interceptors can call the sanitizers interceptors explicitly, which will then use dlsym to call the real function. By making our declarations of the sanitizer interceptor function weak we can handle any combination of intercepts (including none, if there is no sanitizer). If our declaration is resolves to a NULL pointer, we just use dlsym. Signed-off-by: Fergus Dall <sidereal@google.com>
Diffstat (limited to 'tests/cpp-compile-test.cpp')
0 files changed, 0 insertions, 0 deletions