This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING^3][RFC, PATCH][ASAN] Implement dynamic allocas/VLAs sanitization.​


On Jul 10 2017, Maxim Ostapenko <m.ostapenko@samsung.com> wrote:

> diff --git a/gcc/asan.c b/gcc/asan.c
> index 95004d7..89c2731 100644
> --- a/gcc/asan.c
> +++ b/gcc/asan.c
> @@ -1567,9 +1567,10 @@ asan_emit_allocas_unpoison (rtx top, rtx bot, rtx_insn *before)
>    else
>      start_sequence ();
>    rtx ret = init_one_libfunc ("__asan_allocas_unpoison");
> +  top = convert_memory_address (ptr_mode, top);
> +  bot = convert_memory_address (ptr_mode, bot);
>    ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode, 2, top,
> -				 TYPE_MODE (pointer_sized_int_node), bot,
> -				 TYPE_MODE (pointer_sized_int_node));
> +				 ptr_mode, bot, ptr_mode);

There is another similar occurence:

/opt/gcc/gcc-20170711/gcc/testsuite/gcc.dg/asan/pr80168.c:7:1: internal compiler error: in emit_library_call_value_1, at calls.c:4555
0x701577 emit_library_call_value_1
	../../gcc/calls.c:4554
0x7068d7 emit_library_call_value(rtx_def*, rtx_def*, libcall_type, machine_mode, int, ...)
	../../gcc/calls.c:5159
0x6f2307 expand_asan_emit_allocas_unpoison
	../../gcc/builtins.c:4978
0x6f2307 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
	../../gcc/builtins.c:6787
0x81fa6f expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
	../../gcc/expr.c:10841
0x716517 expand_expr
	../../gcc/expr.h:276
0x716517 expand_call_stmt
	../../gcc/cfgexpand.c:2664
0x716517 expand_gimple_stmt_1
	../../gcc/cfgexpand.c:3583
0x716517 expand_gimple_stmt
	../../gcc/cfgexpand.c:3749
0x719077 expand_gimple_basic_block
	../../gcc/cfgexpand.c:5753
0x71dfc7 execute
	../../gcc/cfgexpand.c:6360

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]