Closed Bug 1123394 Opened 5 years ago Closed 5 years ago

Shell interrupt handler can go re-entrant

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox36 --- fixed
firefox37 --- fixed
firefox38 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

While debugging a test failure caused by the patch in bug 1120591, I found that the shell interrupt callback could be re-entered if another part of the system requested an interrupt while the callback function was executing.  

This can happen for example if a GC allocation threshold is passed in the callback.

The fix is to reset the gServiceInterrupt flag at the start of ShellInterruptCallback(), before we invoke the callback.
Attachment #8551387 - Flags: review?(shu)
Blocks: 1120591
Comment on attachment 8551387 [details] [diff] [review]
dont-reenter-interrupt-callback

Review of attachment 8551387 [details] [diff] [review]:
-----------------------------------------------------------------

Good catch! Thanks for the patch.
Attachment #8551387 - Flags: review?(shu) → review+
https://hg.mozilla.org/mozilla-central/rev/9d6a46c2a96a
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Blocks: 1019612
Comment on attachment 8551387 [details] [diff] [review]
dont-reenter-interrupt-callback

Approval Request Comment
[Feature/regressing bug #]: Bug 1019612
[User impact if declined]: None, shell only.
[Describe test coverage new/current, TreeHerder]: On m-c for two weeks.
[Risks and why]: Low.
[String/UUID change made/needed]: None.
Attachment #8551387 - Flags: approval-mozilla-aurora?
Duplicate of this bug: 1127319
Attachment #8551387 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.