[Lldb-commits] [PATCH] D28035: Stop limiting the number of TSan backtrace size to 8

Kuba (Brecka) Mracek via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 21 15:09:22 PST 2016


kubabrecka created this revision.
kubabrecka added reviewers: jasonmolenda, clayborg.
kubabrecka added subscribers: lldb-commits, zaks.anna.
kubabrecka added a project: Sanitizers.

We currently limit the length of TSan returned backtraces to 8, which is not necessary (and a bug, most likely).  Let's remove this.


https://reviews.llvm.org/D28035

Files:
  source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp


Index: source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
===================================================================
--- source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
+++ source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
@@ -206,7 +206,8 @@
   StructuredData::Array *trace = new StructuredData::Array();
   ValueObjectSP trace_value_object =
       o->GetValueForExpressionPath(trace_item_name.c_str());
-  for (int j = 0; j < 8; j++) {
+  size_t count = trace_value_object->GetNumChildren();
+  for (size_t j = 0; j < count; j++) {
     addr_t trace_addr =
         trace_value_object->GetChildAtIndex(j, true)->GetValueAsUnsigned(0);
     if (trace_addr == 0)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28035.82280.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161221/33d4d661/attachment.bin>


More information about the lldb-commits mailing list