[Lldb-commits] [PATCH] D59291: [Object] Add basic minidump support

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 21 10:30:03 PDT 2019

labath added a comment.

In D59291#1438053 <https://reviews.llvm.org/D59291#1438053>, @aprantl wrote:

> Looks like this uncovered some UB:
> http://lab.llvm.org:8080/green/view/LLDB/job/lldb-sanitized/2050/testReport/junit/lldb-Suite/functionalities_postmortem_minidump-new/TestMiniDumpUUID_py/

I'm pretty sure this was caused by https://reviews.llvm.org/D59433 and not by this patch because LLDB does not use this code (yet).

Incidentally, just today I was working on adding string reading to the llvm parser, and noticed this potential misaligned access in lldb code. I don't think it can ever occur in practice for real (valid) minidumps, because those will have those fields correctly aligned, but I believe the reason that patch caught this problem is that the hand-crafted minidumps Greg created did not respect the natural alignment of the types. I think the fix is to regenerate the minidump binaries to correctly align the string fields, and also teach the lldb string reader to reject misaligned strings. The second part may not be so important, as I am going to delete that code soon anyway.

Alternatively, we could teach the lldb string reader to handle the misaligned strings correctly (most likely by memcpying them into aligned storage)...




More information about the lldb-commits mailing list