mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 19:47:32 +09:00
[js, ARM] Always check error return from BufferOffset::diffB.
We were missing error checks at two points. In one case an error return is meaningful; in another case it is not, as the problem should have been guarded against at a higher level by emitting far jump islands soon enough during pasteup of compiled code.
This commit is contained in:
parent
269dfa5bac
commit
772e51c7b4
2 changed files with 10 additions and 2 deletions
|
|
@ -2401,7 +2401,12 @@ Assembler::as_b(Label* l, Condition c)
|
|||
if (oom())
|
||||
return BufferOffset();
|
||||
|
||||
as_b(BufferOffset(l).diffB<BOffImm>(ret), c, ret);
|
||||
BOffImm off = BufferOffset(l).diffB<BOffImm>(ret);
|
||||
if (off.isInvalid()) {
|
||||
m_buffer.fail_bail();
|
||||
return BufferOffset();
|
||||
}
|
||||
as_b(off, c, ret);
|
||||
#ifdef JS_DISASM_ARM
|
||||
spewBranch(m_buffer.getInstOrNull(ret), l);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue