Closed Bug 2030908 Opened 8 months ago Closed 8 months ago

Assertion failure: isEnabled(), at js/src/gc/Nursery.cpp:1905

Categories

(Core :: JavaScript: GC, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2029515
Tracking Status
firefox-esr140 --- unaffected
firefox149 --- unaffected
firefox150 --- unaffected
firefox151 --- affected

People

(Reporter: csmantle, Unassigned)

References

(Regression)

Details

(Keywords: regression, reporter-external)

Run this script:

gczeal(4);
for (let i = 0; i < 16; i++) {
    new Float32Array(128);
}

on the JS shell built on x86-64 with the following mozconfig and at the following commit:

ac_add_options --enable-address-sanitizer
ac_add_options --disable-jemalloc
ac_add_options --enable-project=js
ac_add_options --enable-debug
ac_add_options --enable-optimize
ac_add_options --enable-jit
ac_add_options --enable-wasm-jspi
ac_add_options --enable-linker=mold
Commit ID: 07e27bfce5acf193bdb89c7ba2aa73451a3e43b4
Change ID: xmnxsnurpxnluuvumlwqymomnqrkwups
Bookmarks: main main@git main@origin main@upstream
Author   : Emilio Cobos Álvarez <emilio@crisal.io> (2026-04-07 20:22:46)
Committer: rperta@mozilla.com <rperta@mozilla.com> (2026-04-08 02:06:29)

    Bug 2029949 - Fix explicit inheritance of custom props, and annotate a fail
ure that fails for non-custom props already.

    See bug 2030129 for the root cause.

... produces the following crash:

> ~/workspace/mozilla-firefox-dev/obj-native/dist/bin/js /tmp/test.js
[1044192] Assertion failure: isEnabled(), at /home/mantle/workspace/mozilla-firefox-dev/js/src/gc/Nursery.cpp:1905
#01: ???[/home/mantle/workspace/mozilla-firefox-dev/obj-native/dist/bin/js +0x3beab43]
#02: ???[/home/mantle/workspace/mozilla-firefox-dev/obj-native/dist/bin/js +0x3bd80e1]
#03: ???[/home/mantle/workspace/mozilla-firefox-dev/obj-native/dist/bin/js +0x3bd827e]
#04: ???[/home/mantle/workspace/mozilla-firefox-dev/obj-native/dist/bin/js +0x5339615]
#05: ??? (???:???)
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1044192==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x559625742b6f bp 0x7ffd788c42d0 sp 0x7ffd788c42a0 T0)
==1044192==The signal is caused by a WRITE memory access.
==1044192==Hint: address points to the zero page.
/home/mantle/workspace/mozilla-firefox-dev/obj-native/dist/bin/llvm-symbolizer: error: '[anon:js-executable-memory]': No such file or directory
    #0 0x559625742b6f in MOZ_CrashSequence(void*, long) /home/mantle/workspace/mozilla-firefox-dev/obj-native/dist/include/mozilla/Assertions.h:235:3
    #1 0x559625742b6f in js::Nursery::requestMinorGC(JS::GCReason) /home/mantle/workspace/mozilla-firefox-dev/js/src/gc/Nursery.cpp:1905:3
    #2 0x5596257300e0 in js::Nursery::addMallocedBufferBytes(unsigned long) /home/mantle/workspace/mozilla-firefox-dev/js/src/gc/Nursery-inl.h:35:5
    #3 0x5596257300e0 in js::Nursery::registerMallocedBuffer(void*, unsigned long) /home/mantle/workspace/mozilla-firefox-dev/js/src/gc/Nursery.cpp:1785:3
    #4 0x55962573027d in js::Nursery::allocateZeroedBuffer(js::gc::Cell*, unsigned long, unsigned long) /home/mantle/workspace/mozilla-firefox-dev/js/src/gc/Nursery.cpp:842:8
    #5 0x559626e91614 in (anonymous namespace)::FixedLengthTypedArrayObjectTemplate<float>::makeTypedArrayWithTemplate(JSContext*, js::TypedArrayObject*, int) /home/mantle/workspace/mozilla-firefox-dev/js/src/vm/TypedArrayObject.cpp:1070:27
    #6 0x559626e91614 in js::NewTypedArrayWithTemplateAndLength(JSContext*, JS::Handle<JSObject*>, int) /home/mantle/workspace/mozilla-firefox-dev/js/src/vm/TypedArrayObject.cpp:1340:5
    #7 0x23d451948a29  ([anon:js-executable-memory]+0x17a29)

==1044192==Register values:
rax = 0x0000000000000000  rbx = 0x00000fcefd4fc637  rcx = 0x0000000000000771  rdx = 0x0000000000000000
rdi = 0x0000559628e5d090  rsi = 0x00007ffd788c4258  rbp = 0x00007ffd788c42d0  rsp = 0x00007ffd788c42a0
 r8 = 0x0000000000000000   r9 = 0xffffff0000000000  r10 = 0xefffffffffffffff  r11 = 0x4000000000000000
r12 = 0x0000000000000000  r13 = 0x0000000000000020  r14 = 0x00007e77ea7e31b8  r15 = 0x00007e77ea7e30a8
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/mantle/workspace/mozilla-firefox-dev/obj-native/dist/include/mozilla/Assertions.h:235:3 in MOZ_CrashSequence(void*, long)
==1044192==ABORTING
Aborted                    (core dumped) ~/workspace/mozilla-firefox-dev/obj-native/dist/bin/js /tmp/test.js

A bisect session indicated that the regressor is:

The first bad revision is: oswyrklq 33681a75 Bug 2028176 - Part 3: Fix minor issues with the nursery r=sfink

Submitting this as security-sensitive as a precaution.


The script is found by fuzzing and is manually minimized.

Setting the regression bug number based on the bisect result.

Keywords: regression
Regressed by: 2028176
Group: core-security → javascript-core-security

Also a duplicate of bug 2029515?

Flags: needinfo?(jcoppeard)

Set release status flags based on info from the regressing bug 2028176

Status: NEW → RESOLVED
Closed: 8 months ago
Duplicate of bug: 2029515
Flags: needinfo?(jcoppeard)
Resolution: --- → DUPLICATE

Jon, is it okay to added me to the CC list of Bug 2029515?

Flags: needinfo?(jcoppeard)

Sure, done.

Flags: needinfo?(jcoppeard)
Group: javascript-core-security
You need to log in before you can comment on or make changes to this bug.