https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121684
Bug ID: 121684
Summary: [16 regression]
c-c++-common/hwasan/unprotected-allocas-1.c regression
since r16-101-g132d01d96ea9d6
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: thiago.bauermann at linaro dot org
Target Milestone: ---
Created attachment 62208
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62208&action=edit
.s file generated by commit r16-101-g132d01d96ea9d6
After r16-101-g132d01d96ea9d6, I see these failures on aarch64-linux-gnu:
Running gcc.dg/hwasan/hwasan.exp ...
FAIL: c-c++-common/hwasan/unprotected-allocas-1.c -O3 -g scan-assembler-not
__hwasan_tag_memory
FAIL: c-c++-common/hwasan/unprotected-allocas-1.c -O3 -g execution test
Here are the instances of __hwasan_tag_memory in the assembly:
$ grep -n -C 5 __hwasan_tag_memory commit-132d01d96ea/unprotected-allocas-1.s
73- mov x29, sp
74- .loc 1 29 1 is_stmt 0 view .LVU16
75- lsr x1, x0, 56
76- add x0, sp, 16
77- add w1, w1, 1
78: bl __hwasan_tag_memory
79-.LVL4:
80- .loc 1 31 3 is_stmt 1 view .LVU17
81- .loc 1 32 3 view .LVU18
82- .loc 1 33 3 view .LVU19
83-.LBB22:
--
102- bne .L9
103- .loc 1 29 1 view .LVU26
104- add x0, sp, 16
105- mov x2, 48
106- mov w1, 0
107: bl __hwasan_tag_memory
108-.LVL5:
109- .loc 1 39 1 view .LVU27
110- ldp x29, x30, [sp], 64
111- .cfi_remember_state
112- .cfi_restore 30
--
1990-.LASF3:
1991- .string "big_array"
1992-.LASF16:
1993- .string "main"
1994-.LASF17:
1995: .string "__hwasan_tag_memory"
1996-.LASF7:
1997- .string "using_vararray"
1998-.LASF14:
1999- .string "__builtin_abort"
2000-.LASF11:
--
2002- .section .debug_line_str,"MS",@progbits,1
2003-.LASF0:
2004- .string
"/home/thiago.bauermann/src/gcc/gcc/testsuite/c-c++-common/hwasan/unprotected-allocas-1.c"
2005-.LASF1:
2006- .string "/home/thiago.bauermann/tmp"
2007: .global __hwasan_tag_memory
2008- .section .note.GNU-stack,"",@progbits
I'll attach the .s file from before and after the commit.
GCC configured with:
~/src/gcc/configure \
--with-gnu-as \
--with-gnu-ld \
--enable-lto \
--enable-shared \
--without-included-gettext \
--enable-nls \
--with-system-zlib \
--disable-sjlj-exceptions \
--enable-gnu-unique-object \
--enable-linker-build-id \
--disable-libstdcxx-pch \
--enable-c99 \
--enable-clocale=gnu \
--enable-libstdcxx-debug \
--enable-long-long \
--with-isl=no \
--disable-multilib \
--enable-fix-cortex-a53-835769 \
--enable-fix-cortex-a53-843419 \
--with-arch=armv8-a \
--enable-threads=posix \
--enable-multiarch \
--enable-libstdcxx-time=yes \
--enable-gnu-indirect-function \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=c,c++,fortran,lto