[warp] Assertion failure: vreg(ins->getTemp(i)).type() != vreg(use).type() || (use->isFixedRegister() && ins->getTemp(i)->isFixed()), at jit/BacktrackingAllocator.cpp:709
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr68 | --- | unaffected |
| firefox-esr78 | --- | unaffected |
| firefox79 | --- | unaffected |
| firefox80 | --- | unaffected |
| firefox81 | --- | fixed |
People
(Reporter: decoder, Assigned: jandem)
References
(Regression)
Details
(Keywords: assertion, regression, testcase, Whiteboard: [bugmon:update,bisected,confirmed])
Attachments
(5 files)
The following testcase crashes on mozilla-central revision 20200813-f46205a42fae (debug build, run with --fuzzing-safe --ion-offthread-compile=off --warp --baseline-eager --ion-full-warmup-threshold=10):
(function(global) {
global.assertDeepEq = (function() {})();
})(this);
function LoggingProxy(target) {
var h55 = {};
return new Proxy(target || [], h55);
}
LoggingProxy.from = Array.from;
LoggingProxy.from([3, 4, 5]);
var arr = [5, 6, 7];
assertDeepEq(Array.from(new LoggingProxy(arr)), [5, 6, 7]);
Backtrace:
received signal SIGSEGV, Segmentation fault.
#0 0x585c54e1 in ?? ()
[...]
#25 0x57d54542 in ?? ()
#26 0x57a67add in _start ()
eax 0x5676782d 1450604589
ebx 0x592e14ec 1496192236
ecx 0x592e1f5c 1496194908
edx 0x0 0
esi 0xecdd4618 -321042920
edi 0x592e14ec 1496192236
ebp 0xffffa0e8 4294942952
esp 0xffff9f80 4294942592
eip 0x585c54e1 1482446049
=> 0x585c54e1: movl $0x2c5,0x0
0x585c54eb: call 0x57a8de97 <abort>
Reproduces on 32-bit only.
| Reporter | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Slightly minified:
function ArrayFrom(C, items) {
var A = new C();
var k = 0;
for (var i = 0; i < items.length; ++i) {}
A.length = k;
}
function LoggingProxy() {
return new Proxy([], {});
}
ArrayFrom(LoggingProxy, [3, 4, 5]);
ArrayFrom(Array, [5, 6, 7]);
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
LProxySet has non-fixed, "atStart" registers, but also temporary registers.
Updated•5 years ago
|
| Assignee | ||
Comment 5•5 years ago
|
||
The assertion also affects jit-tests on 32-bit with Warp enabled so we're just missing test coverage there for now.
The assertion is unnecessary nowadays, with the backtracking allocator temps never alias inputs (even at-start uses). I'll add an assertion for that and clean this up a bit.
| Assignee | ||
Comment 6•5 years ago
|
||
Temps cover both the input and output part of the instruction, so their ranges
always overlap with at-start uses (covering the input) and non-at-start uses
(covering both input and output). This means the allocated register must be
different from any uses.
Defs cover only the output part of the instruction so there at-start makes a
difference.
Updated•5 years ago
|
| Assignee | ||
Comment 7•5 years ago
|
||
Given that temps never alias inputs as established in the previous patch, this
assertion isn't necessary. It's possible the LSRA allocator did things differently.
The assertion was also weird/wrong because it depends on LDefinition::Type, but
there are multiple Types that could still map to the same Register. It looks
like bug 1067610 broke this; before that refactoring we compared isFloatReg().
Depends on D87263
| Assignee | ||
Comment 8•5 years ago
|
||
This prevents the potential issue described in the comment and most instructions
already did this anyway.
Depends on D87264
| Assignee | ||
Comment 9•5 years ago
|
||
Depends on D87265
Comment 10•5 years ago
|
||
Set release status flags based on info from the regressing bug 1658882
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b9e192acbc34
https://hg.mozilla.org/mozilla-central/rev/bc3a6719c0f4
https://hg.mozilla.org/mozilla-central/rev/ed4528417b1b
https://hg.mozilla.org/mozilla-central/rev/b0b25fca6075
| Assignee | ||
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Updated•2 years ago
|
Description
•