[tor-commits] [tor-browser/esr24] Bug 1019684 - Turn an assert into a release mode crash instead. r=mjrosenb, a=dveditz

mikeperry at torproject.org mikeperry at torproject.org
Fri Aug 29 05:26:42 UTC 2014


commit b662bbc824cf22db8ca20521bf6eb12ca592da70
Author: Brian Hackett <bhackett1024 at gmail.com>
Date:   Thu Jun 12 09:11:00 2014 -0400

    Bug 1019684 - Turn an assert into a release mode crash instead. r=mjrosenb, a=dveditz
---
 js/src/jit/arm/Assembler-arm.cpp |    4 ++--
 js/src/jit/arm/Assembler-arm.h   |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/js/src/jit/arm/Assembler-arm.cpp b/js/src/jit/arm/Assembler-arm.cpp
index 9969d22..9746521 100644
--- a/js/src/jit/arm/Assembler-arm.cpp
+++ b/js/src/jit/arm/Assembler-arm.cpp
@@ -1852,7 +1852,7 @@ Assembler::as_b(Label *l, Condition c, bool isPatchable)
         // This will currently throw an assertion if we couldn't actually
         // encode the offset of the branch.
         if (!BOffImm::isInRange(old)) {
-            m_buffer.bail();
+            m_buffer.fail_bail();
             return ret;
         }
         ret = as_b(BOffImm(old), c, isPatchable);
@@ -1915,7 +1915,7 @@ Assembler::as_bl(Label *l, Condition c)
         // encode the offset of the branch.
         old = l->offset();
         if (!BOffImm::isInRange(old)) {
-            m_buffer.bail();
+            m_buffer.fail_bail();
             return ret;
         }
         ret = as_bl(BOffImm(old), c);
diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h
index 7af98dc..f33c2bc 100644
--- a/js/src/jit/arm/Assembler-arm.h
+++ b/js/src/jit/arm/Assembler-arm.h
@@ -975,7 +975,8 @@ class BOffImm
       : data ((offset - 8) >> 2 & 0x00ffffff)
     {
         JS_ASSERT((offset & 0x3) == 0);
-        JS_ASSERT(isInRange(offset));
+        if (!isInRange(offset))
+            CrashAtUnhandlableOOM("BOffImm");
     }
     static bool isInRange(int offset)
     {





More information about the tor-commits mailing list