summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/lsan/lsan_interceptors.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [compiler-rt] Fix lint check failure on commentsJinsong Ji2019-09-221-1/+2
| | | | | | | | | This fixes buildbot failures for https://reviews.llvm.org/rL372459. (at least on PowerPC/Z ) The fix is generated by running clang-format on the error lines only. llvm-svn: 372511
* Add __lsan::ScopedInterceptorDisabler for strerror(3)Kamil Rytarowski2019-09-211-0/+12
| | | | | | | | | | | | | | | | | | | | Summary: strerror(3) on NetBSD uses internally TSD with a destructor that is never fired for exit(3). It's correctly called for pthread_exit(3) scenarios. This is a case when a leak on exit(3) is expected, unavoidable and harmless. Reviewers: joerg, vitalybuka, dvyukov, mgorny Reviewed By: vitalybuka Subscribers: dmgreen, kristof.beyls, jfb, llvm-commits, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67337 llvm-svn: 372461
* Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSDKamil Rytarowski2019-09-211-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* compiler-rt: Rename .cc file in lib/lsan to .cppNico Weber2019-08-011-0/+465
Like r367463, but for lsan. llvm-svn: 367561
OpenPOWER on IntegriCloud