aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorFei Peng <pengfei.02@bytedance.com>2025-10-06 09:51:26 -0700
committerGitHub <noreply@github.com>2025-10-06 12:51:26 -0400
commit208231d1973bb4dd8c8991cfae8db422c443fcdf (patch)
treefa29206a908cf797052929c2a2e953faf0c4b594 /clang/lib/CodeGen/CodeGenModule.cpp
parentd7feeda43717669e207529fdb9b69e9082c6df4a (diff)
downloadllvm-208231d1973bb4dd8c8991cfae8db422c443fcdf.zip
llvm-208231d1973bb4dd8c8991cfae8db422c443fcdf.tar.gz
llvm-208231d1973bb4dd8c8991cfae8db422c443fcdf.tar.bz2
[compiler-rt][TSan] Add support for Android (#147580)
1. Fixed Android setjmp issue. The root cause is that TSan initializes before longjmp_xor_key is set up. During __libc_init_vdso, a call to strcmp triggers TSan initialization, which occurs before __libc_init_setjmp_cookie. The solution is to call InitializeLongjmpXorKey on the first use of longjmp_xor_key. Additionally, correct LONG_JMP_SP_ENV_SLOT by following the bionic source code. 2. Skip thr object range check on Android. On Android, thr is allocated on the heap, causing the check to fail. 3. Disable intercepting clone on Android. pthread_create internally calls clone. Disabling the interception of clone resolves the issue in most scenarios. 4. Use a workaround to recover the thr pointer stored in TLS_SLOT_SANITIZER slot, whose value was modified by Skia. This PR solved the issue from NDK https://github.com/android/ndk/issues/1041. Test project: https://github.com/bytedance/android_tsan_sample/
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions