Assertion failure: js::gc::IsCellPointerValid(bi), at dist/include/js/Value.h:627
Categories
(Core :: JavaScript: WebAssembly, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr128 | --- | unaffected |
| firefox131 | --- | wontfix |
| firefox132 | --- | wontfix |
| firefox133 | --- | fixed |
People
(Reporter: gkw, Assigned: bvisness)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, reporter-external, testcase)
Attachments
(2 files)
function g() {
new WebAssembly.Memory({ initial: BigInt(0), index: "i64" }).grow(BigInt(0));
oomTest(g);
}
g();
627 MOZ_ASSERT(js::gc::IsCellPointerValid(bi));
(gdb) bt
#0 JS::Value::setBigInt (this=0x7fffffffc200, bi=0x0) at /home/yksubu/shell-cache/js-dbg-64-linux-x86_64-d0454173ade6/objdir-js/dist/include/js/Value.h:627
#1 0x0000555558756358 in JS::BigIntValue (bi=0x555555777677) at /home/yksubu/shell-cache/js-dbg-64-linux-x86_64-d0454173ade6/objdir-js/dist/include/js/Value.h:1199
#2 IndexValue (cx=cx@entry=0x7ffff6b37000, value=value@entry=0, indexType=<optimized out>) at /home/yksubu/trees/mozilla-central/js/src/wasm/WasmJS.cpp:628
#3 0x0000555558755feb in js::WasmMemoryObject::growImpl (cx=cx@entry=0x7ffff6b37000, args=...) at /home/yksubu/trees/mozilla-central/js/src/wasm/WasmJS.cpp:2254
#4 0x0000555558756548 in JS::CallNonGenericMethod<&(IsMemory(JS::Handle<JS::Value>)), &js::WasmMemoryObject::growImpl> (cx=0x7ffff6b37000, args=...) at /home/yksubu/shell-cache/js-dbg-64-linux-x86_64-d0454173ade6/objdir-js/dist/include/js/CallNonGenericMethod.h:103
#5 js::WasmMemoryObject::grow (cx=cx@entry=0x7ffff6b37000, argc=<optimized out>, vp=<optimized out>) at /home/yksubu/trees/mozilla-central/js/src/wasm/WasmJS.cpp:2261
/snip
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/8f4fb6c25a2d
user: Ben Visness
date: Mon Aug 26 20:49:39 2024 +0000
summary: Bug 1913350: Use BigInt for memory64 params/results. r=rhunt
Run with --fuzzing-safe --no-threads --no-baseline --no-ion, 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 d0454173ade6.
Setting s-s just in case. Ben, is bug 1913350 a likely regressor?
Comment 1•1 year ago
|
||
Set release status flags based on info from the regressing bug 1913350
| Assignee | ||
Comment 2•1 year ago
|
||
Yes, bug 1913350 seems like the obvious regressor. I'll take a look.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 3•1 year ago
|
||
We simply were not handling the case where BigInt::createFromUint64
returns nullptr (which it always does under OOM conditions).
Updated•1 year ago
|
Comment 4•1 year ago
|
||
This is a bug in our OOM handling. The worst case is that we create a tagged big int JS::Value which actually points to nullptr instead of a valid JS::BigInt value. The size of a JS::BigInt is 16 bytes [1], so any access to this value will always be well within the null page for a guaranteed crash.
Updated•1 year ago
|
Comment 6•1 year ago
|
||
| bugherder | ||
Comment 7•1 year ago
|
||
The patch landed in nightly and beta is affected.
:bvisness, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox132towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Description
•