================
@@ -89,8 +89,11 @@ Status 
MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {
         "Failed to fill in header and directory "
         "sections. Written / Expected (%" PRIx64 " / %" PRIx64 ")",
         new_offset, m_saved_data_size);
-
   return error;
+  if (error.Fail())
+    return error;
----------------
Jlalond wrote:

We do have a [test that depends on the dynamic 
loader](https://github.com/llvm/llvm-project/blob/af83093933ca73bc82c33130f8bda9f1ae54aae2/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py#L611),
 but it was passing in CI, even with this incorrect return which is unexpected. 
I tested locally by capturing a minidump with TLS variables on an older version 
of lldb, and verified there is no dyld or TLS variables when loaded with LLDB 
built on this patch. Capturing and loading on this patch ensured it worked. 
This does mean we're making a breaking change for behavior, where all older TLS 
minidumps will no longer work.

https://github.com/llvm/llvm-project/pull/120166
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to