This assert fails when the trampoline code size worst case is realized.
Observed on a Android device with HWASan [1] enabled, where heap
addresses have a non-zero tag in the most significant byte, and thus
require 4 instructions to materialize in emit_imm64.
[1] https://source.android.com/devices/tech/debug/hwasan
Commit migrated from https://github.com/mono/mono/commit/
06673e723ec3d59b071a1b763680f252b71c5de4
arm_patch_rel (item->jmp_code, imt_entries [item->check_target_idx]->code_target, MONO_R_ARM64_BCC);
}
- g_assert ((code - buf) < buf_len);
+ g_assert ((code - buf) <= buf_len);
mono_arch_flush_icache (buf, code - buf);
MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL));