projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
153c394
)
tsan: protect trace memory range on startup
author
Dmitry Vyukov
<dvyukov@google.com>
Fri, 5 Dec 2014 10:06:06 +0000
(10:06 +0000)
committer
Dmitry Vyukov
<dvyukov@google.com>
Fri, 5 Dec 2014 10:06:06 +0000
(10:06 +0000)
so that user does not map something there ahead of us
llvm-svn: 223456
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
index
46b648c
..
4612741
100644
(file)
--- a/
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
+++ b/
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
@@
-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);
}