The ASan fast unwinder sometimes likes to add frames like 0x0 or 0xffffffff at 
the very ending of the stack trace. Let's ignore these frames.

http://reviews.llvm.org/D5361

Files:
  source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
Index: source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
===================================================================
--- source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
+++ source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
@@ -155,6 +155,7 @@
         ValueObjectSP trace_sp = return_value_sp->GetValueForExpressionPath(".alloc_trace");
         for (int i = 0; i < alloc_count; i++) {
             addr_t pc = trace_sp->GetChildAtIndex(i, true)->GetValueAsUnsigned(0);
+            if (pc == 0 || pc == 1 || pc == LLDB_INVALID_ADDRESS) continue;
             pcs.push_back(pc);
         }
         
@@ -171,6 +172,7 @@
         ValueObjectSP trace_sp = return_value_sp->GetValueForExpressionPath(".free_trace");
         for (int i = 0; i < free_count; i++) {
             addr_t pc = trace_sp->GetChildAtIndex(i, true)->GetValueAsUnsigned(0);
+            if (pc == 0 || pc == 1 || pc == LLDB_INVALID_ADDRESS) continue;
             pcs.push_back(pc);
         }
         
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to