Closed Bug 1372830 Opened 7 years ago Closed 2 months ago

Support all unwind opcodes when generating CFI information in minidump-analyzer

Categories

(Toolkit :: Crash Reporting, enhancement)

x86_64
Windows
enhancement

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: ccorcoran, Unassigned)

References

(Blocks 1 open bug)

Details

Bug 1333126 currently aims to improve client stack traces by extracting CFI from unwind metadata in PE files. But the current method of doing this has limitations due to superficial handling of unwind info. The code is based on Breakpad's PDBSourceLineWriter::PrintFrameDataUsingEXE ( https://searchfox.org/mozilla-central/source/toolkit/crashreporter/google-breakpad/src/common/windows/pdb_source_line_writer.cc#689 ). This code measures the size of the stack frame based on unwind opcodes. But it does not take into account the details of many of these opcodes. For example it will fail to calculate the stack size of xul!ffi_call_win64 ( https://searchfox.org/mozilla-central/source/js/src/ctypes/libffi/src/x86/win64.S#83 ) This is because ffi_call_win64 emits UWOP_SET_FPREG, which PrintFrameDataUsingEXE ignores. Some of the scenarios where we currently fail to generate CFI include: * Functions that use alloca() * Functions that modify RSP after the prologue * Functions that set the frame pointer in another register (UWOP_SET_FPREG) * Functions that make child calls *during* the prologue (in between unwind ops) * Any time during epilogue
:gsvelto -- do you have an opinion about the priority of this bug? Should this live in some other component?
Flags: needinfo?(gsvelto)
(In reply to Selena Deckelmann :selenamarie :selena use ni? pronoun: she from comment #1) > :gsvelto -- do you have an opinion about the priority of this bug? This would significantly improve the information we get in crash pings on Windows so it's rather important for my team. We planned to work on it in the coming months. > Should this live in some other component? Definitely, I'll move it to crash reporting where it belongs.
Flags: needinfo?(gsvelto)
Component: General → Crash Reporting
Product: Core → Toolkit
Severity: normal → S3

This will be fixed by bug 1743983, which uses the minidump-unwind crate, which uses the framehop crate, which supports all unwind codes.

Depends on: 1743983
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.