Closed Bug 909534 Opened 11 years ago Closed 11 years ago

asm.js signal handler should _exit() instead of exit()

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: khuey, Assigned: luke)

Details

Attachments

(3 files)

Running at/on_exit functions is a bad idea.
Ah, good point.  The exit() call is intended to be, as the comment explains, a backstop and never actually executed.  OOC, are you actually seeing this executed?  In which branch?
ckitching was seeing it on Android after hitting a previous fatal assertion.  Log coming up.
Could you 'p prevHandler->sa_sigaction' in the AsmJSFaultHandler (I'm hoping for a symbolic name here).
Also, looking at this handler again, it seems wrong to call exit() in the SA_SIGINFO branch: what if the chained handler fixes up the fault (like AsmJSFaultHandler does) or calls sigaction(..., NULL) and returns (like AsmJSFaultHandler does in the 'else' branch; so that the fault happens at the faulting instruction.

I'll patch.
Assignee: general → luke
Status: NEW → ASSIGNED
Attachment #796201 - Flags: review?(bhackett1024)
This is a small related cleanup I've been meaning to do: SIGBUS was only necessary for OSX and x86 segment prefixes.
Attachment #796203 - Flags: review?(bhackett1024)
Attachment #796201 - Flags: review?(bhackett1024) → review+
Attachment #796203 - Flags: review?(bhackett1024) → review+
Kyle: does this fix the problem for you?
Chris?
Flags: needinfo?(ckitching)
https://hg.mozilla.org/mozilla-central/rev/4543cebdc8a0
https://hg.mozilla.org/mozilla-central/rev/e89815fe247d
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
So it appears that by default Bugzilla stops showing the needinfo flag when the bug is closed...

You're too efficient! :P

Yes, this seems to have fixed the problem. My more recent work isn't producing unbearably huge and confusing sequences of segfaults any more. (At least, not of length >1)
Flags: needinfo?(ckitching)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: