Open Bug 1620990 Opened 4 years ago Updated 1 year ago

Rewrite the Windows exception-handler in Rust

Categories

(Toolkit :: Crash Reporting, task)

All
Windows
task

Tracking

()

People

(Reporter: gsvelto, Unassigned)

References

(Blocks 2 open bugs)

Details

As per the title we should rewrite Breakpad's exception handler in Rust and put the code in the new Rust crate that will replace Breakpad. We should at least match the functionality we have in Breakpad.

The code here will not be able to function in a stand-alone way but can be written separately from the rest.

Blocks: 1620994
Blocks: 1633052
Severity: normal → S3

Note to myself: my idea for this was to have a single top-level vectored exception handler and all consumers from within Firefox would register callbacks within it, handling exceptions as they see fit. This would allow us to establish the order in which exceptions have to be handled without having to rely on the implicit ordering of SEH.

One issue in this design is that some external code (and some code within Firefox) relies on SEH to catch certain exceptions and move ahead. While we can change our code to use the new exception handler we don't have control over Microsoft code doing this, or even worse, injected DLLs from a third party. So before going ahead and using a VEH for everything we need a way to detect and deal with existing SEH so that they keep working correctly.

You need to log in before you can comment on or make changes to this bug.