Module Name: src Committed By: kamil Date: Fri Sep 11 01:04:34 UTC 2020
Modified Files: src/external/gpl3/gcc/dist/libsanitizer/asan: asan_interceptors.h src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_interceptors.cc src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_platform_interceptors.h Log Message: Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD Cherry-pick and adapt: commit 8827047551570b7ed7088765c3de2a8cce6823b8 Author: Kamil Rytarowski <n...@gmx.com> Date: Sat Sep 21 07:30:42 2019 +0000 Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD Summary: The atexit(3) and __cxa_atexit() calls allocate internally memory and free on exit, after executing all callback. This causes false positives as DoLeakCheck() is called from the atexit handler. In the LSan/ASan tests there are strict checks triggering false positives here. Intercept all atexit(3) and __cxa_atexit() calls and disable LSan when calling the real functions. Stop tracing allocations in pthread_atfork(3) funtions, as there are performed internal allocations that are not freed for the time of running StopTheWorld() code. This avoids false-positives. The same changes have to be replicated in the ASan and LSan runtime. Non-NetBSD OSs are not tested and this code is restricted to NetBSD only. Reviewers: dvyukov, joerg, mgorny, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: jfb, llvm-commits, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67331 llvm-svn: 372459 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.