Closed Bug 1407075 Opened 7 years ago Closed 2 years ago

Add an alternative signal stack in our codebase that does not depend on breakpad

Categories

(Toolkit :: Crash Reporting, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox58 --- affected
firefox59 --- ?

People

(Reporter: decoder, Unassigned)

References

Details

Currently, breakpad is calling sigaltstack() to make sure we have an alternative signal stack for processing signals. With the changes in bug 1403668, all of our SIGSEGV handlers will use the alternative signal stack to ensure that they are working even in the case of a stack overflow.

However, in build types that both have the crash reporter disabled and AddressSanitizer (which also sets up an alternative signal stack) not enabled, this will not work and fallback to the old default stack behavior.

As proposed by Ted and Nathan, we should probably factor out the sigaltstack code from breakpad and include it directly in our codebase unconditionally (or in non-asan builds in case that it interferes with ASan).
Ted -- what kind of priority should we put on this? And who should do this work?
Flags: needinfo?(ted)
This is low-priority cleanup. decoder's patch in bug 1403668 fixed the pressing issue where we weren't handling stack overflows properly. The proposed change here would fix build configurations that we don't ship, and could consolidate some duplicated code.
Flags: needinfo?(ted)
Component: General → Crash Reporting
Product: Core → Toolkit

I've implemented something like this in bug 1678152. It covers all thread except for the main one (because Breakpad handles that) but it should be easy to both factor this code out and put it in a separate library that can be included even when the crash reporter is disabled. Given this bug is 5 years old is this something we should prioritize?

Flags: needinfo?(choller)

From a fuzzing perspective, we are no longer using any builds that do not have a sanitizer component of some sort enabled (at minimum, they have the UBSan runtime), so from a fuzzing perspective we can wontfix this.

Flags: needinfo?(choller)

Thanks!

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.