asan: fix RTX emission for ilp32

gcc/ChangeLog:

	PR sanitizer/95634
	* asan.c (asan_emit_stack_protection): Fix emission for ilp32
	by using Pmode instead of ptr_mode.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
(cherry picked from commit 8cff672cb9a132d3d3158c2edfc9a64b55292b80)
parent 036b288c
......@@ -1613,6 +1613,7 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
mem = adjust_address (mem, ptr_mode, offset);
rtx addr = gen_reg_rtx (ptr_mode);
emit_move_insn (addr, mem);
addr = convert_memory_address (Pmode, addr);
mem = gen_rtx_MEM (QImode, addr);
emit_move_insn (mem, const0_rtx);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment