Closed Bug 1349989 Opened 8 years ago Closed 8 years ago

Crash in JS::CloneAndExecuteScript called from PrecompiledScript::ExecuteInGlobal

Categories

(Core :: XPConnect, defect)

Unspecified
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox52 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- unaffected
firefox55 --- fixed

People

(Reporter: mccr8, Assigned: kmag)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-c151cf56-673d-49b4-8d61-199ee2170322.
=============================================================

I only see two crashes from one installation, but it looks like a null deref in code landed in bug 1333990, so maybe there's something that can be fixed here.
Flags: needinfo?(kmaglione+bmo)
Hm. I don't think it's possible for mScript to be null there. Maybe we're passing in a nuked sandbox and failing to enter its compartment, though.
Assignee: nobody → kmaglione+bmo
Flags: needinfo?(kmaglione+bmo)
Ah. JS::FinishOffThreadScript returns null if the script has a syntax error.
Comment on attachment 8850848 [details]
Bug 1349989: Correctly handle errors for OMT-compiled scripts.

https://reviewboard.mozilla.org/r/123370/#review125754

::: js/xpconnect/tests/unit/test_compileScript.js:64
(Diff revision 1)
> +  // compilation.
> +  let scriptUrl = `data:,${";".repeat(1024 * 1024)}(`;
> +
> +  yield Assert.rejects(
> +    ChromeUtils.compileScript(scriptUrl),
> +    /SyntaxError: expected expression, got end of script/);

I think SyntaxError itself suffices, rather not have tests depend on the explicit wording of errors.
Attachment #8850848 - Flags: review?(shu) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/518cd94b4580e11a76724b70c37ee0cf476de3b6
Bug 1349989: Correctly handle errors for OMT-compiled scripts. r=shu
https://hg.mozilla.org/mozilla-central/rev/518cd94b4580
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: