Open
Bug 1896854
Opened 5 months ago
Updated 5 months ago
Crash annotations are lost on Windows when xul.dll has sections with names larger than 8 characters
Categories
(Toolkit :: Crash Reporting, defect, P3)
Tracking
()
NEW
People
(Reporter: glandium, Unassigned)
Details
How to reproduce:
- Checkout changeset 605e19d02f88 from the clang 18 upgrade
- Build Firefox
- Run a test that uses annotations, like
toolkit/crashreporter/test/unit/test_oom_annotation.js
What happens:
- because of https://github.com/llvm/llvm-project/issues/92229, xul.dll contains a
.debug_line
section that uses an extension to store the long name (the section table can only contain 8 characters, and.debug_line
is longer than that) - the code in find_section pulls the first 4096 bytes of the binary, which contain the headers, including the section table.
- we call into goblin to get the sections using those bytes.
- goblin then parses every section https://searchfox.org/mozilla-central/rev/7a8904165618818f73ab7fc692ace4a57ecd38c9/third_party/rust/goblin/src/pe/header.rs#257
- and when the section name is an offset in the string table (which is the case when the section name is longer than 8 characters), it tries to read it https://searchfox.org/mozilla-central/rev/7a8904165618818f73ab7fc692ace4a57ecd38c9/third_party/rust/goblin/src/pe/section_table.rs#78
The problem being that the string table is well past the first page in the binary, so an error is emitted there.
A side problem here is that there doesn't seem to be any indication about this loss in the final crash report.
Comment 1•5 months ago
|
||
This is going to be tricky to solve because goblin doesn't have a way to lazily parse the file - yet. We don't have a good solution for this just yet, sort of abandoning goblin for something else.
Severity: -- → S3
Priority: -- → P3
You need to log in
before you can comment on or make changes to this bug.
Description
•