tsan: fix the code that searches for heap memory block metadata
(the old code won't work with new allocator) llvm-svn: 171054
This commit is contained in:
parent
54606d57a2
commit
774defc649
|
@ -119,9 +119,9 @@ void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz) {
|
||||||
}
|
}
|
||||||
|
|
||||||
MBlock *user_mblock(ThreadState *thr, void *p) {
|
MBlock *user_mblock(ThreadState *thr, void *p) {
|
||||||
// CHECK_GT(thr->in_rtl, 0);
|
|
||||||
CHECK_NE(p, (void*)0);
|
CHECK_NE(p, (void*)0);
|
||||||
return (MBlock*)allocator()->GetMetaData(p);
|
Allocator *a = allocator();
|
||||||
|
return (MBlock*)a->GetMetaData(a->GetBlockBegin(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
void invoke_malloc_hook(void *ptr, uptr size) {
|
void invoke_malloc_hook(void *ptr, uptr size) {
|
||||||
|
|
Loading…
Reference in New Issue