Assertion failure: IsNurseryOwned(buffer), at gc/Nursery.cpp:1977
Originally disclosed on Mozilla
- Fixed in 2 days
- Paid in 7 days
- Disclosed after 2 days
Created attachment 9459716
debug stack
'''js
enableShellAllocationMetadataBuilder();
var x = transplantableObject();
x.object[0] = (function(){});
x.transplant(newGlobal());
gc();
'''
Debug stack:
'''
(gdb) bt
#0 js::Nursery::maybeMoveRawBufferOnPromotion (this=0xfffff6c529d0, bufferp=0xffffffffcc80, owner=0x23910d596040, nbytes=<optimized out>) at /home/m1ubu/trees/mozilla-central/js/src/gc/Nursery.cpp:1977
#1 0x0000aaaaad305e34 in js::Nursery::maybeMoveBufferOnPromotion<void> (this=0x0, this@entry=0x38, bufferp=0xffffffffcc80, owner=0x23910d596040, nbytes=56) at /home/m1ubu/trees/mozilla-central/js/src/gc/Nursery.h:249
#2 js::gc::TenuringTracer::moveElements (this=this@entry=0xffffffffd150, dst=dst@entry=0x23910d596040, src=src@entry=0x128d06a013a8, dstKind=dstKind@entry=js::gc::AllocKind::OBJECT4_BACKGROUND) at /home/m1ubu/trees/mozilla-central/js/src/gc/Tenuring.cpp:933
#3 0x0000aaaaad305614 in js::gc::TenuringTracer::promoteObjectSlow (this=0xffffffffd150, src=0x128d06a013a8) at /home/m1ubu/trees/mozilla-central/js/src/gc/Tenuring.cpp:829
#4 0x0000aaaaad3166f8 in js::gc::TenuringTracer::promoteObject (this=<optimized out>, obj=<optimized out>) at /home/m1ubu/trees/mozilla-central/js/src/gc/Tenuring.cpp:147
#5 0x0000aaaaad301160 in js::gc::TenuringTracer::promoteOrForward (this=this@entry=0xffffffffd150, obj=obj@entry=0x128d06a013a8) at /home/m1ubu/trees/mozilla-central/js/src/gc/Tenuring.cpp:128
/snip
'''
'''
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/d95fadc5b8ff
user: Jon Coppeard
date: Tue Jan 07 18:13:34 2025 +0000
summary: Bug 1934856 - Part 2: Use buffer allocator for JSObject elements r=sfink,jandem
'''
Run with `--fuzzing-safe --no-threads --no-baseline --no-ion --more-compartments`, compile with `AR=ar sh ../configure --enable-debug --enable-debug-symbols --with-ccache --enable-gczeal --enable-rust-simd --disable-tests`, tested on m-c rev 70821984b161.
Setting s-s just in case. Jon, is bug 1934856 a likely regressor?
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity memory corruption bug in JavaScript: GC. Mozilla made it public on 17 January 2025.
About Memory corruption
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.