Assertion failure: isDouble(), at dist/include/js/Value.h:1070
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
People
(Reporter: gkw, Assigned: anba)
References
(Blocks 2 open bugs, Regression)
Details
(4 keywords, Whiteboard: [adv-main132-] [adv-esr128.4-])
Attachments
(4 files)
var x = new ArrayBuffer(1, {
maxByteLength: 1,
});
function f() {
new Uint8Array(x);
new Uint8Array(x);
oomTest(f);
}
f();
fullcompartmentchecks(true);
(gdb) bt
#0 JS::Value::toPrivate (this=0x121ad093e2e0) at /home/yksubu/shell-cache/js-dbg-64-linux-x86_64-a51b9d3e7251/objdir-js/dist/include/js/Value.h:1070
#1 js::ArrayBufferViewObject::initialByteOffsetValue (this=this@entry=0x121ad093e298)
at /home/yksubu/trees/mozilla-central/js/src/vm/ArrayBufferViewObject.h:279
#2 0x00005555573d711e in js::ArrayBufferViewObject::dataPointerOffset (this=this@entry=0x121ad093e298)
at /home/yksubu/trees/mozilla-central/js/src/vm/ArrayBufferViewObject.cpp:306
#3 0x00005555573d6cbb in js::ArrayBufferViewObject::trace (trc=<optimized out>, obj=<optimized out>)
at /home/yksubu/trees/mozilla-central/js/src/vm/ArrayBufferViewObject.cpp:44
#4 0x00005555575398ce in JSClass::doTrace (trc=0x7fffffffcef8, obj=0x121ad093e298, this=<optimized out>)
at /home/yksubu/shell-cache/js-dbg-64-linux-x86_64-a51b9d3e7251/objdir-js/dist/include/js/Class.h:660
#5 JSObject::traceChildren (this=0x121ad093e298, trc=0x7fffffffcef8) at /home/yksubu/trees/mozilla-central/js/src/vm/JSObject.cpp:3385
/snip
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/641a1d71cfa8
user: Daniel Minor
date: Wed Jun 05 16:11:18 2024 +0000
summary: Bug 1884150 - Ship growable and resizeable ArrayBuffers; r=sfink
Run with --fuzzing-safe --no-threads --no-baseline --no-ion --no-ggc, compile with AR=ar sh ../configure --enable-debug --enable-debug-symbols --with-ccache --enable-nspr-build --enable-ctypes --enable-gczeal --enable-rust-simd --disable-tests, tested on m-c rev a51b9d3e7251.
Setting s-s just in case. I'm going to guess bug 1884150 merely flipped a switch, so hoping Jan can take a quick look as a start because of a scary stack.
I think I can go back further when I additionally use --enable-arraybuffer-resizable, I'll see what I can get.
Comment 1•2 years ago
|
||
Set release status flags based on info from the regressing bug 1884150
| Reporter | ||
Comment 2•2 years ago
|
||
I think I can go back further when I additionally use
--enable-arraybuffer-resizable, I'll see what I can get.
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/bf6be80ff787
user: André Bargull
date: Tue Feb 27 13:27:46 2024 +0000
summary: Bug 1842999 - Part 9: Change length and byteOffset tracking for easier JIT integration. r=jandem
Andre, would you possibly also be the right person to take a look? Please also feel free to tweak the "Regressed by" field.
| Assignee | ||
Comment 3•2 years ago
|
||
Bug 1842999 is the correct regressor.
| Assignee | ||
Comment 4•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 5•2 years ago
|
||
| Assignee | ||
Comment 6•2 years ago
|
||
I don't think this bug can lead to security-issues, because when we OOM during initialisation of an ArrayBufferView object, the object isn't yet accessible to user-code. And AFAICS even if ArrayBufferViewObject::trace sets the data-pointer to an invalid value through ArrayBufferViewObject::notifyBufferMoved, there aren't any callers from GC code which dereference the bogus data-pointer. (Code other than GC code can be ignored, because, as mentioned above, this issue only arises when there's an OOM during initialisation, so user-code can't get a reference to the ArrayBufferView object in the first place.)
Updated•2 years ago
|
Comment 7•2 years ago
|
||
jonco and I discussed this and we agree it likely isn't security sensitive, but let's keep it hidden for now.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 8•2 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #7)
jonco and I discussed this and we agree it likely isn't security sensitive, but let's keep it hidden for now.
Do you think it makes sense to backport to ESR?
Comment 9•2 years ago
|
||
(In reply to André Bargull [:anba] from comment #8)
Do you think it makes sense to backport to ESR?
Yes please request beta/ESR uplift. It's a small and simple patch that should apply cleanly.
Comment 10•2 years ago
|
||
Too late to uplift to Beta for Fx131 at this point, but an ESR approval request would still be good.
| Assignee | ||
Comment 12•2 years ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D222267
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
esr128 Uplift Approval Request
- User impact if declined: Crashes when assertions are enabled. GC can read bogus values, but doesn't appear to use the bogus values, so there shouldn't be any immediate risk for users.
- Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: N/A
- Risk associated with taking this patch: Low risk
- Explanation of risk level: Low risk because only reorders initialisation of fixed slots.
- String changes made/needed: N/A
- Is Android affected?: yes
| Assignee | ||
Updated•2 years ago
|
Comment 15•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 16•2 years ago
|
||
| uplift | ||
Updated•2 years ago
|
Comment 17•2 years ago
|
||
It looks like the sec-moderate was a mistake since it was added during a conversation where three people agreed this didn't have a security impact on users (comment 6 and comment 7)
Updated•2 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Reporter | ||
Updated•1 year ago
|
Comment 18•1 year ago
|
||
Comment 19•1 year ago
|
||
| bugherder | ||
| Reporter | ||
Updated•1 year ago
|
Description
•