[Lldb-commits] [PATCH] D86261: Add hashing of the .text section to ProcessMinidump.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 21 01:43:03 PDT 2020

labath accepted this revision.
labath added a comment.

In D86261#2229341 <https://reviews.llvm.org/D86261#2229341>, @clayborg wrote:

> Hopefully this should be good to go, let me know if anyone has any issues.

Looks good, just please also add a test case which runs off the end of the text section. If you have problems generating this test with yaml2obj, I would also be fine with a checked-in binary for a special case like this.

Comment at: lldb/test/API/functionalities/postmortem/minidump-new/libbreakpad.yaml:15
+    AddressAlign:    0x0000000000000004
+    Content:         040000001400000003000000474E5500
clayborg wrote:
> labath wrote:
> > I guess this should include a custom `Fill` pseudo-section so that we can guarantee the contents of whatever comes after it. Otherwise, yaml2obj might decide to place anything (or nothing) there. Something like this ought to do it:
> > ```
> > - Type: Fill
> >   Pattern: "DEADBEEF"
> >   Size: 0xsomething
> > ```
> We don't need to because I selected a multiple of 16 for the contents of the text section! If I added one more byte, then we would need to.
I see. In that case, it would be good to have an test case which actually exercises the overflow path. :)

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list