mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-01 12:43:47 +00:00
tsan: protect trace memory range on startup
so that user does not map something there ahead of us llvm-svn: 223456
This commit is contained in:
parent
153c3948f1
commit
bf253a3d3f
@ -324,6 +324,9 @@ static void CheckAndProtect() {
|
||||
ProtectRange(kLoAppMemEnd, kShadowBeg);
|
||||
ProtectRange(kShadowEnd, kMetaShadowBeg);
|
||||
ProtectRange(kMetaShadowEnd, kTraceMemBeg);
|
||||
// Memory for traces is mapped lazily in MapThreadTrace.
|
||||
// Protect the whole range for now, so that user does not map something here.
|
||||
ProtectRange(kTraceMemBeg, kTraceMemEnd);
|
||||
ProtectRange(kTraceMemEnd, kHeapMemBeg);
|
||||
ProtectRange(kHeapMemEnd + PrimaryAllocator::AdditionalSize(), kHiAppMemBeg);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user