summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/safestack/pthread-cleanup.c
Commit message (Collapse)AuthorAgeFilesLines
* SafeStack: Fix flaky test (PR39001)Vlad Tsyrklevich2018-09-211-8/+16
| | | | | | | | | | | | | | | | | | | | Summary: pthread_join() can return before a thread finishes exit()ing in the kernel and a subsequent tgkill() can report the thread still alive. Update the pthread-cleanup.c test to sleep and retry if it hits this possible flake. Thanks to Jeremy Morse for reporting. Reviewers: jmorse, eugenis, vitalybuka Reviewed By: jmorse, vitalybuka Subscribers: delcypher, jfb, llvm-commits, #sanitizers, kcc Differential Revision: https://reviews.llvm.org/D52330 llvm-svn: 342763
* Reland "SafeStack: Delay thread stack clean-up""Vlad Tsyrklevich2018-08-141-8/+23
| | | | | | | | | | This relands commit r339405 (reverted in commit r339408.) The original revert was due to tests failing on a darwin buildbot; however, after looking at the affected code more I realized that the Darwin safestack support has always been broken and disabled it in r339719. This relands the original commit. llvm-svn: 339723
* Revert "SafeStack: Delay thread stack clean-up"Vlad Tsyrklevich2018-08-101-23/+8
| | | | | | | | | This reverts commit r339405, it's failing on Darwin buildbots because it doesn't seem to have a tgkill/thr_kill2 interface. It has a __pthread_kill() syscall, but that relies on having a handle to the thread's port which is not equivalent to it's tid. llvm-svn: 339408
* SafeStack: Delay thread stack clean-upVlad Tsyrklevich2018-08-091-8/+23
| | | | | | | | | | | | | | | | | | Summary: glibc can call SafeStack instrumented code even after the last pthread data destructor has run. Delay cleaning-up unsafe stacks for threads until the thread is dead by having future threads clean-up prior threads stacks. Reviewers: pcc, eugenis Reviewed By: eugenis Subscribers: cryptoad, eugenis, kubamracek, delcypher, llvm-commits, #sanitizers, kcc Differential Revision: https://reviews.llvm.org/D50406 llvm-svn: 339405
* Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne2015-06-151-0/+31
compiler-rt runtime support library This patch adds runtime support for the Safe Stack protection to compiler-rt (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack). This patch is our implementation of the safe stack on top of compiler-rt. The patch adds basic runtime support for the safe stack to compiler-rt that manages unsafe stack allocation/deallocation for each thread. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6096 llvm-svn: 239763
OpenPOWER on IntegriCloud