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:
dea98de
)
tsan: fix bug that leads to spurious use-after-free reports
author
Dmitry Vyukov
<dvyukov@google.com>
Fri, 30 Nov 2012 06:39:01 +0000
(06:39 +0000)
committer
Dmitry Vyukov
<dvyukov@google.com>
Fri, 30 Nov 2012 06:39:01 +0000
(06:39 +0000)
llvm-svn: 168985
compiler-rt/lib/tsan/rtl/tsan_rtl.cc
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
index
e252728
..
26ad784
100644
(file)
--- a/
compiler-rt/lib/tsan/rtl/tsan_rtl.cc
+++ b/
compiler-rt/lib/tsan/rtl/tsan_rtl.cc
@@
-519,6
+519,7
@@
void MemoryResetRange(ThreadState *thr, uptr pc, uptr addr, uptr size) {
void MemoryRangeFreed(ThreadState *thr, uptr pc, uptr addr, uptr size) {
MemoryAccessRange(thr, pc, addr, size, true);
Shadow s(thr->fast_state);
+ s.ClearIgnoreBit();
s.MarkAsFreed();
s.SetWrite(true);
s.SetAddr0AndSizeLog(0, 3);
@@
-527,6
+528,7
@@
void MemoryRangeFreed(ThreadState *thr, uptr pc, uptr addr, uptr size) {
void MemoryRangeImitateWrite(ThreadState *thr, uptr pc, uptr addr, uptr size) {
Shadow s(thr->fast_state);
+ s.ClearIgnoreBit();
s.SetWrite(true);
s.SetAddr0AndSizeLog(0, 3);
MemoryRangeSet(thr, pc, addr, size, s.raw());