diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-09-04 10:36:14 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-09-04 10:36:14 +0000 |
commit | a8f5a36445cb4e264c4d650c2e40e638b1270e9a (patch) | |
tree | afbb90907969aace870eca9bf19f58962cbda4c1 /lib/msan/msan_chained_origin_depot.h | |
parent | 3482b7ad38e8fcd0262d109c6e8c130696837972 (diff) |
[msan] Make origin tracking fork-safe.
Chained origins make plain memory stores async-signal-unsafe.
We already disable it inside signal handlers.
This change grabs all origin-related locks before fork() and releases
them after fork() to avoid a deadlock in the child process.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_chained_origin_depot.h')
-rw-r--r-- | lib/msan/msan_chained_origin_depot.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/msan/msan_chained_origin_depot.h b/lib/msan/msan_chained_origin_depot.h index db427b00d..f7a71cef2 100644 --- a/lib/msan/msan_chained_origin_depot.h +++ b/lib/msan/msan_chained_origin_depot.h @@ -21,6 +21,9 @@ bool ChainedOriginDepotPut(u32 here_id, u32 prev_id, u32 *new_id); // Retrieves a stored stack trace by the id. u32 ChainedOriginDepotGet(u32 id, u32 *other); +void ChainedOriginDepotLockAll(); +void ChainedOriginDepotUnlockAll(); + } // namespace __msan #endif // MSAN_CHAINED_ORIGIN_DEPOT_H |