Open Bug 1901408 Opened 11 months ago Updated 10 months ago

Assertion failure: slot < debugNumValueSlots(), at /root/src/js/src/jit/BaselineFrame.h:156

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: sm-bugs, Unassigned)

References

(Blocks 3 open bugs)

Details

Attachments

(1 file)

662 bytes, application/x-javascript
Details
Attached file bug.js

Steps to reproduce:

Checkout commit 15778b8c32f8535624fff2af36fc669e65a9af3 and invoke the js shell as follows:

/root/js-spidermonkey-shell  --fuzzing-safe  --fast-warmup <testcase>

Actual results:

Assertion failure: slot < debugNumValueSlots(), at /root/src/js/src/jit/BaselineFrame.h:156
Group: firefox-core-security → core-security
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Version: Firefox 125 → Trunk
Group: core-security → javascript-core-security

Test below fails with --fast-warmup.

I think the problem here is that the debugger is trying to take a debugger frame snapshot of a Baseline frame before stack slots have been pushed (from the stack overflow check => interrupt check).

let v0 = 0;
function f1() {
    if (v0++ < 10) {
        interruptIf(true);
        f1();
    }
    const dbg = newGlobal({newCompartment: true}).Debugger(this);
    dbg.getNewestFrame().older.eval("");
    return "";
}
setInterruptCallback(f1);
f1();
Group: javascript-core-security
Severity: -- → S4
Priority: -- → P2

The testcase does not reproduce with the latest debug js shell from FTP (2015-10-21) but reproduces with m-c rev a5887514ddfb (Feb 2022).

Blocks: 1903968

Ian, thanks for fixing Debugger fuzzbugs recently, might this one be in your ballpark as well?

Flags: needinfo?(iireland)

This is a low-value bug to fix. Not only does it require the debugger, but it requires custom interrupt handlers, which don't exist outside the shell. I took a quick look at it to see if there's an easy and obvious fix, but I didn't spot anything. Bumping down the priority.

Flags: needinfo?(iireland)
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: