diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-11-08 22:34:17 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-11-08 22:34:17 +0000 |
commit | 2fd314e2e2e6193722ba5ef4b6b01ae40feeb1fe (patch) | |
tree | 6aaa56baf4b6604d943993605bc3ed92520ee1ab /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | |
parent | bc7f6318ee26b9980b59b3ad6a47d33b485798a6 (diff) | |
download | llvm-2fd314e2e2e6193722ba5ef4b6b01ae40feeb1fe.zip llvm-2fd314e2e2e6193722ba5ef4b6b01ae40feeb1fe.tar.gz llvm-2fd314e2e2e6193722ba5ef4b6b01ae40feeb1fe.tar.bz2 |
Correct atexit(3) support in TSan/NetBSD
Summary:
The NetBSD specific implementation of cxa_atexit() does not
preserve the 2nd argument if dso is equal to NULL.
Changes:
- Split paths of handling intercepted __cxa_atexit() and atexit(3).
This affects all supported Operating Systems.
- Add a local stack-like structure to hold the __cxa_atexit() context.
atexit(3) is documented in the C standard as calling callback from the
earliest to the oldest entry. This path also fixes potential ABI
problem of passing an argument to a function from the atexit(3)
callback mechanism.
- Add new test to ensure LIFO style of atexit(3) callbacks: atexit3.cc
Proposal to change the behavior of __cxa_atexit() in NetBSD has been rejected.
With the above changes TSan/NetBSD with the current tsan_interceptors.cc
can bootstrap into operation.
Sponsored by <The NetBSD Foundation>
Reviewers: vitalybuka, dvyukov, joerg, kcc, eugenis
Reviewed By: dvyukov
Subscribers: kubamracek, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D39619
llvm-svn: 317735
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions