summaryrefslogtreecommitdiffstats
path: root/js/src/jit/arm/Assembler-arm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit/arm/Assembler-arm.cpp')
-rw-r--r--js/src/jit/arm/Assembler-arm.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/src/jit/arm/Assembler-arm.cpp b/js/src/jit/arm/Assembler-arm.cpp
index d82f38e..ce51836 100644
--- a/js/src/jit/arm/Assembler-arm.cpp
+++ b/js/src/jit/arm/Assembler-arm.cpp
@@ -1769,7 +1769,12 @@ BufferOffset Assembler::as_b(Label* l, Condition c) {
BufferOffset ret = allocBranchInst();
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), refLabel(l));
#endif