Assertion failure: !data()->args[i].isMagic(), at /root/src/js/src/vm/ArgumentsObject.h:395
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
People
(Reporter: sm-bugs, Unassigned)
References
(Blocks 2 open bugs)
Details
(Keywords: regression)
Attachments
(1 file)
|
337 bytes,
application/x-javascript
|
Details |
Steps to reproduce:
Checkout commit 15778b8c32f8535624fff2af36fc669e65a9af3 and invoke the js shell as follows:
/root/js-spidermonkey-shell --fuzzing-safe <testcase>
Actual results:
Assertion failure: !data()->args[i].isMagic(), at /root/src/js/src/vm/ArgumentsObject.h:395
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Test below fails with --fast-warmup --no-threads.
The debugger creates an arguments object for the frame that has a JS_OPTIMIZED_OUT magic value for argument 0.
function f() {
var dbg = newGlobal({newCompartment: true}).Debugger(this);
dbg.getNewestFrame().older.eval(`arguments[0] = arguments`);
}
class Cls {
constructor(c) {
for (var i = 0; i < 60; i++) {}
f();
}
}
new Cls(Cls);
Updated•2 years ago
|
Updated•2 years ago
|
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/8246a4ba7eeb
user: Jon Coppeard
date: Mon Nov 13 16:03:20 2023 +0000
summary: Bug 1864419 - Part 2: Add GCOwnedArray for arrays of GC data owned by GC things that may live in the nursery r=jandem
Jon, is bug 1864419 a likely regressor?
Comment 3•2 years ago
|
||
Probably just the last patch to touch this code. Sounds like a debugger issue from previous comments.
Ian, thanks for fixing Debugger fuzzbugs recently, might this one be in your ballpark as well?
Comment 5•2 years ago
|
||
Taking a quick peek, the reason this is a problem at all is that we are trying to set arguments[0], which asserts that the existing value isn't magic to verify that it isn't a MagicEnvSlotValue. If we tried to return JS_OPTIMIZED_OUT from the debugger eval, it would return an object {optimizedOut: true} instead. If we weren't using the debugger, then we would be correct in optimizing it out. But we don't support trying to modify the value inside the debugger eval.
In this particular case, a release build will ignore the assertion and overwrite the value, which gets the correct behaviour.
I think this is also fairly low-value to spend time fixing right now.
Description
•