From a8f5a36445cb4e264c4d650c2e40e638b1270e9a Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 4 Sep 2014 10:36:14 +0000 Subject: [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 --- lib/msan/msan_chained_origin_depot.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/msan/msan_chained_origin_depot.h') 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 -- cgit v1.2.3