[PATCH] D18690: [LSAN] Fix test swapcontext.cc on MIPS

Sagar Thakur via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 02:26:13 PDT 2016


sagar added a comment.

> Is a test (that works on Linux x86_64) possible here?


The test swapcontext.cc itself serves as a test for invalid frame on Linux x86_64 too. The difference between x86_64 and mips in case of unwinding is that x86 uses fast unwinder which checks if the frame is valid before unwinding and mips uses slow unwinder which does not check if the frame is valid before unwinding.


================
Comment at: lib/lsan/lsan.h:23
@@ -22,3 +22,3 @@
     ThreadContext *t;                                                          \
-    if (fast && (t = CurrentThreadContext())) {                                \
       stack_top = t->stack_end();                                              \
----------------
kcc wrote:
> Why did you remove this check  (fast &&)?
Before this patch frame validity check was there only for fast unwinder. So stack top and bottom were fetched only in case of fast unwinder as per my understanding. Now we need it for both unwinders irrespective of whether we use the fast or slow unwinder. Thats the reason I removed this check. Is there any other significance to this check?


Repository:
  rL LLVM

http://reviews.llvm.org/D18690





More information about the llvm-commits mailing list