Closed Bug 832197 Opened 12 years ago Closed 12 years ago

Crash [@ js::gc::Cell::zone] or "Assertion failure: shared->activeUseCount == 0,"

Categories

(Core :: JavaScript Engine, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

VERIFIED FIXED
Tracking Status
firefox18 --- unaffected
firefox19 --- unaffected
firefox20 --- unaffected
firefox21 + fixed
firefox-esr10 --- unaffected
firefox-esr17 --- unaffected
b2g18 --- unaffected

People

(Reporter: gkw, Assigned: sstangl)

References

Details

(4 keywords, Whiteboard: [fuzzblocker] [jsbugmon:update,ignore])

Crash Data

Attachments

(2 files)

Attached file stack (deleted) —
''.search(evalcx("/(?:}?)/", undefined)) gc() gc() asserts js debug shell on m-c changeset b52c02f77cf5 without any CLI arguments at Assertion failure: shared->activeUseCount == 0, s-s because gc is involved. autoBisect shows this is probably related to the following changeset: The first bad revision is: changeset: 118977:f2e3d3913d70 user: Sean Stangl date: Tue Jan 15 15:35:25 2013 -0800 summary: Bug 829758 - use MatchOnly mode for str_search(). r=dvander
Assuming sec-critical, feel free to adjust as necessary.
Keywords: sec-critical
See also bug 832203 which is likely a dup to this, but has security analysis.
(In reply to Christian Holler (:decoder) from comment #2) > See also bug 832203 which is likely a dup to this, but has security analysis. Valgrind doesn't show any error when the testcase in this bug is run on opt builds, so guessing based on the fact that gc is essential and present on the stack. I guess bug 832203 is a more potent testcase.
Whiteboard: [jsbugmon:update] → [jsbugmon:]
JSBugMon: Cannot process bug: Unknown exception (check manually)
Marking as fuzzblocker. This and the test in bug 832203 seem to cause all sorts of crashes.
Whiteboard: [jsbugmon:] → [jsbugmon:update][fuzzblocker]
Sean, comment 0 points to bug 829758, do you think this is a possible regressing changeset?
Flags: needinfo?(sstangl)
(In reply to Gary Kwong [:gkw] from comment #6) > Sean, comment 0 points to bug 829758, do you think this is a possible > regressing changeset? Yes, that's the regressing changeset, but I'm not sure what's so special about str_search() that creates all these cross-compartment RegExpShared references. I would have expected the same behavior to be exposed by exec(), test(), or replace(). We don't actually need the changes to str_search(), so it would be reasonable to back out that patch.
Flags: needinfo?(sstangl)
Whiteboard: [jsbugmon:update][fuzzblocker] → [fuzzblocker] [jsbugmon:]
JSBugMon: Cannot process bug: Unknown exception (check manually)
Nasty bug in the automation was causing this comment although the toolchain was broken...
Whiteboard: [fuzzblocker] [jsbugmon:] → [fuzzblocker] [jsbugmon:update]
Attached file stack for new testcase (deleted) —
try { var r = evalcx("new RegExp(\"\",\"\")", w); var s = ""; (s.search(r))(x) } catch (e) {} r = /()()()()/; try { for (let x = 0; x < 3; ++x) { gc() } } catch (e) {} var w crashes 64-bit js opt shell on m-c changeset 80fed51ae074 with --no-ti -a --ion-gvn=optimistic at js::gc::Cell::zone on Mac 10.8
Crash Signature: [@ js::gc::Cell::zone]
Summary: "Assertion failure: shared->activeUseCount == 0," → Crash [@ js::gc::Cell::zone] or "Assertion failure: shared->activeUseCount == 0,"
I have backed out Bug 829758, so this bug will no longer reproduce and will not block fuzzing. The underlying (preexisting) cause is not fixed, and I would like to re-land that bug at a later date, but I am interested in seeing whether the fuzzers also find similar crashes with .exec(), .test(), and .replace().
Whiteboard: [fuzzblocker] [jsbugmon:update] → [fuzzblocker] [jsbugmon:update,ignore]
JSBugMon: The testcase found in this bug no longer reproduces (tried revision 4e7c92906a79).
Just for reference, not that this bug is fixed by the patch (pending review) in Bug 832217. I'll land the relevant test cases in the re-landing of Bug 829758.
Assignee: general → sstangl
This should now be fixed without the workaround: fix landed in Bug 832217, testcases added in Bug 829758.
Flags: needinfo?(gary)
Flags: in-testsuite+
I have not seen this bug anymore since the backout in comment 11.
Flags: needinfo?(gary)
(In reply to Gary Kwong [:gkw] from comment #15) > I have not seen this bug anymore since the backout in comment 11. Bug 829758 was re-landed -- needinfo was to verify that the fix and resolve the bug :)
Re-tracking, please update status flag to fixed when this is verified.
I verify that the testcases do not reproduce with mozilla-inbound changeset 8619a2942136 (which contains the fix(es) as described in comment 14). Marking FIXED by bug 832217, and thus VERIFIED and in-testsuite+ because testcases landed in bug 829758.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: