Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Changed WTFCrash to not trash the crash site register state.
https://bugs.webkit.org/show_bug.cgi?id=153996 Reviewed by Geoffrey Garen. When doing post-mortem crash site analysis using data from crash reports, it is immensely valuable to be able to infer the crashing program's state from the register values at crash time. However, for RELEASE_ASSERT failures, we crash using WTFCrash(), and WTFCrash() is currently implemented as a function call that, in turn, calls a lot of other functions to do crash handling before actually crashing. As a result, the register values captured in the crash reports are not likely to still contain the values used by the caller function that failed the RELEASE_ASSERT. This patch aims to remedy this issue for non-debug builds on OS(DARWIN) ports. It does so by changing WTFCrash() into an inlined function that has an inlined asm statement to issues the CPU specific breakpoint trap instruction. As a result, for non-debug OS(DARWIN) builds, crashes due to failed RELEASE_ASSERTs will now show up in crash reports as crashing due to EXC_BREAKPOINT (SIGTRAP) instead of a EXC_BAD_ACCESS (SIGSEGV) on address 0xbbadbeef. For debug and non-DARWIN builds, WTFCrash() behavior currently remains unchanged. * wtf/Assertions.cpp: * wtf/Assertions.h: Canonical link: https://commits.webkit.org/172198@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
51 additions
and 1 deletion.
- +28 −0 Source/WTF/ChangeLog
- +2 −0 Source/WTF/wtf/Assertions.cpp
- +21 −1 Source/WTF/wtf/Assertions.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters