Closed Bug 308395 Opened 20 years ago Closed 20 years ago

JS_Assert is uncatchable, even in a debugger

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Assigned: mrbkap)

Details

Attachments

(1 file)

Currently, JS_Assert currently calls abort() unconditionally if the current platform is not WIN32. This hurts on Linux, since by the time gdb catches the SIGABRT the stack has been totally corrupted and it's impossible to go back and inspect what happened to cause the assertion. OS2 uses asm("int $3") currently, and Linux can too, I'll attach a patch that uses the preprocessor test given in xpcom/base/nsDebugImpl.cpp.
Attached patch As describedSplinter Review
Attachment #195971 - Flags: review?(brendan)
Attachment #195971 - Flags: review?(brendan) → review+
Fix checked into trunk. I don't think this needs to go in on the branch.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Flags: testcase-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: