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 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
df35732ab2
commit
58b89416b9
@ -1373,7 +1373,7 @@ void Assembler::bind_to(Label* L, int pos) {
|
||||
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);
|
||||
|
@ -467,7 +467,7 @@ void Assembler::bind_to(Label* L, int pos) {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user