<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ARM] REGRESSION(r197655): ASSERTION FAILED: (cond == Zero) || (cond == NonZero)"
href="https://bugs.webkit.org/show_bug.cgi?id=159419">159419</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ARM] REGRESSION(r197655): ASSERTION FAILED: (cond == Zero) || (cond == NonZero)
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>Other
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Critical
</td>
</tr>
<tr>
<th>Priority</th>
<td>P1
</td>
</tr>
<tr>
<th>Component</th>
<td>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ossy@webkit.org
</td>
</tr>
<tr>
<th>CC</th>
<td>benjamin@webkit.org, fpizlo@apple.com
</td>
</tr>
<tr>
<th>Blocks</th>
<td>155066
</td>
</tr></table>
<p>
<div>
<pre><a href="https://trac.webkit.org/changeset/197655">https://trac.webkit.org/changeset/197655</a> modified the code in compileArithMul()
to check negative zero:
- speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::LessThan, reg1, TrustedImm32(0)));
- speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::LessThan, reg2, TrustedImm32(0)));
+ speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Signed, reg1));
+ speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Signed, reg2));
Using branchTest32 with signed conditional flag is incorrect, because the underlying
tst ARM assembly instruction doesn't affect the V (signed/overflow) flag at all.
The MacroAssemblerARM.h asserts in this case properly.
ASSERTION FAILED: (cond == Zero) || (cond == NonZero)
../../Source/JavaScriptCore/assembler/MacroAssemblerARM.h(714) : JSC::AbstractMacroAssembler<JSC::ARMAssembler, JSC::MacroAssemblerARM>::Jump JSC::MacroAssemblerARM::branchTest32(JSC::MacroAssemblerARM::ResultCondition, JSC::AbstractMacroAssembler<JSC::ARMAssembler, JSC::MacroAssemblerARM>::RegisterID, JSC::AbstractMacroAssembler<JSC::ARMAssembler, JSC::MacroAssemblerARM>::TrustedImm32)
1 0x41af4060 WTFCrash
2 0x40fa0a20 JSC::MacroAssemblerARM::branchTest32(JSC::MacroAssemblerARM::ResultCondition, JSC::ARMRegisters::RegisterID, JSC::AbstractMacroAssembler<JSC::ARMAssembler, JSC::MacroAssemblerARM>::TrustedImm32)
3 0x413ab1e0 JSC::DFG::SpeculativeJIT::compileArithMul(JSC::DFG::Node*)
4 0x41410fec JSC::DFG::SpeculativeJIT::compile(JSC::DFG::Node*)
5 0x4139f5ec JSC::DFG::SpeculativeJIT::compileCurrentBlock()
6 0x4139fcec JSC::DFG::SpeculativeJIT::compile()
7 0x4127220c JSC::DFG::JITCompiler::compileBody()
8 0x41273e04 JSC::DFG::JITCompiler::compileFunction()
9 0x4134ed18 JSC::DFG::Plan::compileInThreadImpl(JSC::DFG::LongLivedState&)
10 0x4134e078 JSC::DFG::Plan::compileInThread(JSC::DFG::LongLivedState&, JSC::DFG::ThreadData*)
11 0x411f2e88
12 0x411f2fec JSC::DFG::compile(JSC::VM&, JSC::CodeBlock*, JSC::CodeBlock*, JSC::DFG::CompilationMode, unsigned int, JSC::Operands<JSC::JSValue, JSC::OperandValueTraits<JSC::JSValue> > const&, WTF::PassRefPtr<JSC::DeferredCompilationCallback>)
13 0x41600004
Illegal instruction
ERROR: Unexpected exit code: 132</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>