Skip to content

Commit 51ccee3

Browse files
authored
i#7132: Disable instr_length DEBUG_ASSERT on 32-bit ARM. (#7184)
Until i#4016 is fixed, on 32-bit ARM a 4-byte T32 instruction may turn into a 2-byte instruction when decoded and then reencoded. Issue: #4016 Fixes: #7132
1 parent 1f360cb commit 51ccee3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clients/drcachesim/tracer/raw2trace.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,7 +2666,11 @@ instr_summary_t::construct(void *dcontext, app_pc block_start, DR_PARAM_INOUT ap
26662666
}
26672667
DEBUG_ASSERT(*pc > desc->pc_);
26682668
desc->length_ = static_cast<byte>(*pc - desc->pc_);
2669+
// FIXME i#4016: On ARM calling instr_length causes the instruction to be
2670+
// reencoded and that can change the length of a T32 instr from 4 to 2.
2671+
#ifndef ARM
26692672
DEBUG_ASSERT(*pc - desc->pc_ == instr_length(dcontext, instr));
2673+
#endif
26702674

26712675
desc->packed_ = 0;
26722676

0 commit comments

Comments
 (0)