[PATCH] [lsan] Support ASan's stack-use-after-return mode in LSan.
Kostya Serebryany
kcc at google.com
Mon Oct 14 04:13:48 PDT 2013
================
Comment at: lib/asan/asan_fake_stack.cc:146
@@ +145,3 @@
+ uptr begin = reinterpret_cast<uptr>(ff);
+ callback(begin, begin + FakeStack::BytesInSizeClass(class_id), arg);
+ }
----------------
Sergey Matveev wrote:
> Some frames might be pending garbage collection. I wonder if it would be safe to filter them out based on the stack pointer value that we have from ptrace? (I.e. the same way as in FakeStack::GC() above.)
Can we just call GC here?
(this could be done separately)
================
Comment at: lib/asan/asan_thread.cc:320
@@ +319,3 @@
+ if (!t) return;
+ if (!t->fake_stack()) return;
+ t->fake_stack()->ForEachFakeFrame(callback, arg);
----------------
you should use has_fake_stack()
================
Comment at: lib/asan/asan_fake_stack.h:151
@@ -150,1 +150,3 @@
+ void ForEachFakeFrame(RangeIteratorCallback callback, void *arg);
+
----------------
maybe ForEachExtraRootChunk or similar?
I don't like the ide of exposing the name "FakeFrame" in the interface that has nothing to do with fake frames
http://llvm-reviews.chandlerc.com/D1901
More information about the llvm-commits
mailing list