Closed Bug 2065364 Opened 3 months ago Closed 3 months ago

Assertion failure: thisArg->type() == MIRType::MagicIsConstructing || thisArg->isPhi(), at checkouts/gecko/js/src/jit/WarpCacheIRTranspiler.cpp:6327

Categories

(Core :: JavaScript Engine: JIT, defect, P2)

defect

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox154 --- unaffected
firefox155 --- unaffected
firefox156 --- fixed

People

(Reporter: tsmith, Assigned: jandem)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: assertion, pernosco, regression)

Attachments

(1 external file)

Found with m-c 20260817-99db6c0ec8d0 (--enable-debug)

This was found by visiting a live website with a debug build.

STR:

  • Launch browser and visit site

This issue was triggered by visiting http://clickflare.io/. A Pernosco session is available here: https://pernos.co/debug/KcnbiBv2ebg4E-d3bffxOg/index.html

Assertion failure: thisArg->type() == MIRType::MagicIsConstructing || thisArg->isPhi(), at checkouts/gecko/js/src/jit/WarpCacheIRTranspiler.cpp:6327

14|0|libxul.so|WarpCacheIRTranspiler::maybeCreateThis(js::jit::MDefinition*, js::jit::CallFlags, WarpCacheIRTranspiler::CallKind)|git:github.com/mozilla-firefox/firefox:js/src/jit/WarpCacheIRTranspiler.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|6326|0x84
14|1|libxul.so|WarpCacheIRTranspiler::emitCallFunction(js::jit::ObjOperandId, js::jit::Int32OperandId, mozilla::Maybe<js::jit::ObjOperandId>, js::jit::CallFlags, WarpCacheIRTranspiler::CallKind, mozilla::Maybe<unsigned int>)|git:github.com/mozilla-firefox/firefox:js/src/jit/WarpCacheIRTranspiler.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|6421|0x229
14|2|libxul.so|WarpCacheIRTranspiler::emitCallNativeFunction(js::jit::CacheIRReader&)|git:github.com/mozilla-firefox/firefox:js/src/jit/WarpCacheIRTranspiler.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|323|0x91
14|3|libxul.so|WarpCacheIRTranspiler::transpile(std::initializer_list<js::jit::MDefinition*>)|git:github.com/mozilla-firefox/firefox:js/src/jit/WarpCacheIRTranspiler.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|357|0x2094
14|4|libxul.so|js::jit::TranspileCacheIRToMIR(js::jit::WarpBuilder*, js::BytecodeLocation, js::jit::WarpCacheIRBase const*, std::initializer_list<js::jit::MDefinition*>, js::jit::CallInfo*)|git:github.com/mozilla-firefox/firefox:js/src/jit/WarpCacheIRTranspiler.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|7385|0x12d
14|5|libxul.so|js::jit::WarpBuilder::buildCallOp(js::BytecodeLocation)|git:github.com/mozilla-firefox/firefox:js/src/jit/WarpBuilder.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|2254|0x2e0
14|6|libxul.so|js::jit::WarpBuilder::buildBody()|git:github.com/mozilla-firefox/firefox:js/src/jit/WarpBuilder.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|998|0x406
14|7|libxul.so|js::jit::WarpBuilder::build()|git:github.com/mozilla-firefox/firefox:js/src/jit/WarpBuilder.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|309|0x8f
14|8|libxul.so|js::jit::CompileBackEnd(js::jit::MIRGenerator*, js::jit::WarpSnapshot*)|git:github.com/mozilla-firefox/firefox:js/src/jit/Ion.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|1720|0xec
14|9|libxul.so|js::jit::IonCompileTask::runHelperThreadTask(js::AutoLockHelperThreadState&)|git:github.com/mozilla-firefox/firefox:js/src/jit/IonCompileTask.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|28|0x90
14|10|libxul.so|js::GlobalHelperThreadState::runTaskLocked(JS::HelperThreadTask*, js::AutoLockHelperThreadState&)|git:github.com/mozilla-firefox/firefox:js/src/vm/HelperThreads.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|666|0x10e
14|11|libxul.so|JS::RunHelperThreadTask(JS::HelperThreadTask*)|git:github.com/mozilla-firefox/firefox:js/src/vm/HelperThreads.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|611|0xc2
14|12|libxul.so|HelperThreadTaskHandler::Run()|git:github.com/mozilla-firefox/firefox:js/xpconnect/src/XPCJSContext.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|1164|0xc
14|13|libxul.so|mozilla::TaskController::RunPoolThread(mozilla::PoolThread*)|git:github.com/mozilla-firefox/firefox:xpcom/threads/TaskController.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|449|0x228
14|14|libnspr4.so|_pt_root|git:github.com/mozilla-firefox/firefox:nsprpub/pr/src/pthreads/ptthread.c:6fd3453f587cfcd74637bad0b7b67f3d4680e679|198|0x18c
14|15|firefox-bin|set_alt_signal_stack_and_start(PthreadCreateParams*)|git:github.com/mozilla-firefox/firefox:mozglue/interposers/pthread_create_interposer.cpp:6fd3453f587cfcd74637bad0b7b67f3d4680e679|81|0x10d

I think this is just an over-zealous assertion being confused by the new Ion generator support. Here's a reduced testcase:

function* foo() {
  new DataView(yield 2);
}

function bar() {
  let g = foo();
  g.next();
  g.next(new ArrayBuffer(2))
}

for (var i = 0; i < 5000; i++) {
  bar();
}

We yield while evaluating the arguments for the DataView constructor. The magic IsConstructing value is already on the stack when we yield, so we store it in the generator and load it when resuming. It's not a constant or a phi, so we assert, but nothing is actually incorrect.

Keywords: regression
Regressed by: 2062253

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

:jandem, since you are the author of the regressor, bug 2062253, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

The test also covers yield*, spread, and .return(..) cases. These are all
complicated so it seemed worth testing.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(jdemooij)
Severity: -- → S3
Priority: -- → P2
Pushed by jdemooij@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/dde89a1fb28e https://hg.mozilla.org/integration/autoland/rev/b02f2c45258a Fix assertion failure when suspending with JS_IS_CONSTRUCTING on the stack. r=iain
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
QA Whiteboard: [qa-triage-done-c157/b156]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: