Revision: 11941
Author:   [email protected]
Date:     Wed Jun 27 05:33:39 2012
Log: Enable the CHECK for near-jump displacement range in Release mode too.

If we're generating bad code anyway, we might as well crash immediately and at least get a proper backtrace.

Review URL: https://chromiumcodereview.appspot.com/10697004
http://code.google.com/p/v8/source/detail?r=11941

Modified:
 /branches/bleeding_edge/src/ia32/assembler-ia32.cc
 /branches/bleeding_edge/src/x64/assembler-x64.cc

=======================================
--- /branches/bleeding_edge/src/ia32/assembler-ia32.cc Mon Jun 11 09:47:08 2012 +++ /branches/bleeding_edge/src/ia32/assembler-ia32.cc Wed Jun 27 05:33:39 2012
@@ -1373,7 +1373,7 @@
     ASSERT(offset_to_next <= 0);
     // Relative address, relative to point after address.
     int disp = pos - fixup_pos - sizeof(int8_t);
-    ASSERT(0 <= disp && disp <= 127);
+    CHECK(0 <= disp && disp <= 127);
     set_byte_at(fixup_pos, disp);
     if (offset_to_next < 0) {
       L->link_to(fixup_pos + offset_to_next, Label::kNear);
=======================================
--- /branches/bleeding_edge/src/x64/assembler-x64.cc Mon Jun 11 09:47:08 2012 +++ /branches/bleeding_edge/src/x64/assembler-x64.cc Wed Jun 27 05:33:39 2012
@@ -467,7 +467,7 @@
         static_cast<int>(*reinterpret_cast<int8_t*>(addr_at(fixup_pos)));
     ASSERT(offset_to_next <= 0);
     int disp = pos - (fixup_pos + sizeof(int8_t));
-    ASSERT(is_int8(disp));
+    CHECK(is_int8(disp));
     set_byte_at(fixup_pos, disp);
     if (offset_to_next < 0) {
       L->link_to(fixup_pos + offset_to_next, Label::kNear);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to