Closed
Bug 743000
Opened 14 years ago
Closed 13 years ago
Crash [@ JSCompartment::wrap] or [@ TypedArrayTemplate<int>::copyFromTypedArray] or "Assertion failure: IsFastOrSlowTypedArray(obj),"
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla14
Tracking | Status | |
---|---|---|
firefox11 | --- | unaffected |
firefox12 | --- | unaffected |
firefox13 | --- | unaffected |
firefox14 | + | fixed |
firefox-esr10 | --- | unaffected |
People
(Reporter: gkw, Assigned: sfink)
References
Details
(5 keywords, Whiteboard: [advisory-tracking-])
Crash Data
Attachments
(2 files)
Int32Array(wrap(new Uint8ClampedArray))
asserts js debug shell on m-c changeset 1da11a2bc5db without any CLI flags at Assertion failure: IsFastOrSlowTypedArray(obj), and crashes js opt shell at TypedArrayTemplate<int>::copyFromTypedArray
s-s just to be safe, this might be related to bug 736609. A shell compiled with the patch in bug 736609 still shows this assert.
![]() |
Reporter | |
Comment 1•14 years ago
|
||
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: 91040:17e95355ad77
user: Bobby Holley
date: Thu Apr 05 09:39:41 2012 +1000
summary: Bug 737245 - Typed Arrays should handle cross-compartment wrappers; part3. r=luke
Blocks: 737245
Comment 2•14 years ago
|
||
This stuff has been taken over by sfink and markh. I didn't land the patches (though I wrote them a while back), so I'm not really in the loop here.
![]() |
Reporter | |
Comment 3•14 years ago
|
||
This also crashes as JSCompartment::wrap on Mac with another testcase:
evalcx("wrap(new Uint8ClampedArray).buffer;", newGlobal("new-compartment"));
Crash Signature: [@ TypedArrayTemplate<int>::copyFromTypedArray] → [@ TypedArrayTemplate<int>::copyFromTypedArray]
[@ JSCompartment::wrap]
OS: Windows 7 → All
Hardware: x86 → All
Summary: Crash [@ TypedArrayTemplate<int>::copyFromTypedArray] or "Assertion failure: IsFastOrSlowTypedArray(obj)," → Crash [@ JSCompartment::wrap] or [@ TypedArrayTemplate<int>::copyFromTypedArray] or "Assertion failure: IsFastOrSlowTypedArray(obj),"
Assignee | ||
Comment 4•14 years ago
|
||
I think this should be fixed with bug 741041, though I'll need to check to be sure. It's definitely the sort of thing that I'm trying to fix. Thanks!
Status: NEW → ASSIGNED
![]() |
Reporter | |
Comment 5•14 years ago
|
||
I've found a version that crashes at js::GCMarker::drainMarkStack, so I'm quite sure this can be [sg:critical].
Whiteboard: js-triage-needed → [sg:critical] js-triage-needed
![]() |
Reporter | |
Comment 6•14 years ago
|
||
(In reply to Steve Fink [:sfink] from comment #4)
> I think this should be fixed with bug 741041, though I'll need to check to
> be sure. It's definitely the sort of thing that I'm trying to fix. Thanks!
Bug 741041 should land in Firefox 14, else the regressor of this bug needs to be backed out.
![]() |
Reporter | |
Comment 7•14 years ago
|
||
> I've found a version that crashes at js::GCMarker::drainMarkStack, so I'm
> quite sure this can be [sg:critical].
Function("b = wrap(Float64Array()).buffer")()
gc()
I've attached the backtrace for this testcase. This testcase accesses weird memory address 0xebe04511.
![]() |
Reporter | |
Comment 8•14 years ago
|
||
> Function("b = wrap(Float64Array()).buffer")()
> gc()
This also asserts 32-bit js debug shell on mozilla-central changeset 434f50e70815 without any CLI arguments at Assertion failure: IsFastOrSlowTypedArray(obj)
Assignee | ||
Comment 9•14 years ago
|
||
(In reply to Steve Fink [:sfink] from comment #4)
> I think this should be fixed with bug 741041, though I'll need to check to
> be sure. It's definitely the sort of thing that I'm trying to fix. Thanks!
I was wrong. Bug 711843 fixes this.
The problem is that eg prop_getBuffer() calls js_IsTypedArray() that, as of the patch identified in comment 1, unconditionally unwraps its argument. This is wrong in all kinds of ways. I could probably come up with a spot fix that partially rolled back that patch, but bug 711843 restructures the code flow so it's easy to only unwrap on the paths that need it.
If I can't get bug 711843 landed in the next few days, I'll work on a spot fix.
Depends on: 711843
![]() |
||
Comment 10•14 years ago
|
||
(In reply to Steve Fink [:sfink] from comment #9)
> (In reply to Steve Fink [:sfink] from comment #4)
> If I can't get bug 711843 landed in the next few days, I'll work on a spot
> fix.
Sounds like a plan :) (Assigning this one to you)
Assignee: general → sphink
Updated•14 years ago
|
status-firefox-esr10:
--- → unaffected
status-firefox13:
--- → unaffected
status-firefox14:
--- → affected
Updated•14 years ago
|
tracking-firefox14:
--- → +
![]() |
Reporter | |
Updated•14 years ago
|
status-firefox11:
--- → unaffected
status-firefox12:
--- → unaffected
![]() |
Reporter | |
Comment 11•13 years ago
|
||
Confirming fixed by bug 743000 (http://hg.mozilla.org/mozilla-central/rev/7a601537cb88)
autoBisect shows this is probably related to the following changeset:
The first good revision is:
changeset: 92092:7a601537cb88
user: Tom Schuster
date: Sat Jan 14 09:43:00 2012 -0800
summary: Bug 711843 - Update JSAPI for typed arrays, remove uses of jstypedarray.h outside the engine [r=Waldo,bz,Ms2ger,bholley,bjacob,philikon,evilpie,bent,yourmama] [a=mfinkle thanks to gkw]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
![]() |
Reporter | |
Updated•13 years ago
|
Target Milestone: --- → mozilla14
Comment 12•13 years ago
|
||
JSBugMon: This bug has been automatically verified fixed.
Updated•13 years ago
|
Status: RESOLVED → VERIFIED
Updated•13 years ago
|
Group: core-security
Updated•13 years ago
|
Whiteboard: [sg:critical] js-triage-needed → [sg:critical][advisory-tracking-] js-triage-needed
Updated•13 years ago
|
Keywords: sec-critical
Whiteboard: [sg:critical][advisory-tracking-] js-triage-needed → [advisory-tracking-]
Comment 13•13 years ago
|
||
Automatically extracted testcase for this bug was committed:
https://hg.mozilla.org/mozilla-central/rev/efaf8960a929
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•