Closed Bug 787709 Opened 12 years ago Closed 12 years ago

Crash [@ js::ArrayBufferObject::removeFinalizedView] or "Assertion failure: linkObj,"

Categories

(Core :: JavaScript Engine, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla18
Tracking Status
firefox15 --- unaffected
firefox16 --- unaffected
firefox17 - unaffected
firefox18 + fixed
firefox-esr10 --- unaffected
firefox-esr17 --- unaffected

People

(Reporter: gkw, Assigned: sfink)

References

Details

(5 keywords, Whiteboard: [jsbugmon:](fixed in bug 787775)[qa-])

Crash Data

Attachments

(2 files)

Attached file stack
for each(var x in DataView(eval("y = ArrayBuffer();"))) {};
function f() {
	gc();
}
f();

asserts js debug shell on m-c changeset c64a9f342156 without any CLI arguments at Assertion failure: linkObj,

The testcase crashes js opt shell as well, at js::ArrayBufferObject::removeFinalizedView when pasted into the shell.

s-s because gc is involved and also because 0xa0 is being accessed.

autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   104015:804d74e217e3
user:        Steve Fink
date:        Thu Aug 23 21:29:42 2012 -0700
summary:     Bug 720949 - Add JSAPI for transferring ArrayBuffer contents
I wonder why there was a tab-character in the testcase... Anyway here's an untabbed version:

for each(var x in DataView(eval("y = ArrayBuffer();"))) {};
function f() {
    gc();
}
f();
Whiteboard: [jsbugmon:update] → [jsbugmon:update,ignore]
JSBugMon: The testcase found in this bug no longer reproduces (tried revision 5f7e3a8d6640).
Whiteboard: [jsbugmon:update,ignore] → [jsbugmon:bisectfix]
Whiteboard: [jsbugmon:bisectfix] → [jsbugmon:]
JSBugMon: Fix Bisection requested, result:
autoBisect shows this is probably related to the following changeset:

The first good revision is:
changeset:   104414:22e9cbb8bb92
user:        Steve Fink
date:        Wed Sep 05 15:00:39 2012 -0700
summary:     Bug 787775 - Register DataViews with their ArrayBuffers upon creation. r=luke
Steve, is this a dup of 787775? If so, can we add the testcase here to the test suite at least?
(In reply to Christian Holler (:decoder) from comment #4)
> Steve, is this a dup of 787775? If so, can we add the testcase here to the
> test suite at least?

Yes, it is. I'll add something similar to the test suite. This works:

./js -e 'var ab = new ArrayBuffer(4); var dv = new DataView(ab); dv = 1; gc()'

(All you need to do is create a DataView on an ArrayBuffer, and gc the DataView without gcing the ArrayBuffer.)
I verified that this crashes before, does not crash after.
Assignee: general → sphink
https://hg.mozilla.org/mozilla-central/rev/e2fe8fa1f29b
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → DUPLICATE
Target Milestone: --- → mozilla18
Marking VERIFIED as testcase has landed in the testsuite.
Status: RESOLVED → VERIFIED
If this is a duplicate of 787775 and like that one a regression from bug 720949 then is Firefox 17 really "affected"? If so is it too late to uplift the patch in bug 787775 to Firefox 17 Beta?
Whiteboard: [jsbugmon:] → [jsbugmon:][sg:dupe 787775]
(In reply to Daniel Veditz [:dveditz] from comment #10)
> If this is a duplicate of 787775 and like that one a regression from bug
> 720949 then is Firefox 17 really "affected"? If so is it too late to uplift
> the patch in bug 787775 to Firefox 17 Beta?

It doesn't look like Firefox 17 could be affected here since both bug 787775 and 720949 appear to only affect 18. Minusing for tracking unless someone has a different read on this.
That is correct; 17 is not affected.
Since the bug this was dupe'd to was not a security bug I'd rather mark this issue "fixed" and "depends on" the dupe.

Doesn't need to remain hidden because it never even made it as far as Beta releases.
Group: core-security
Depends on: 787775
Resolution: DUPLICATE → FIXED
Whiteboard: [jsbugmon:][sg:dupe 787775] → [jsbugmon:](fixed in bug 787775)
Marking as qa- per comment 9.
Whiteboard: [jsbugmon:](fixed in bug 787775) → [jsbugmon:](fixed in bug 787775)[qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: