https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113534
Bug ID: 113534
Summary: printf might report segmentation fault under -mabi=ms
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: haochen.jiang at intel dot com
Target Milestone: ---
A reproducer:
$ /export/users/haochenj/env/build_no_bootstrap_master/gcc/xgcc
-B/export/users/haochenj/env/build_no_bootstrap_master/gcc/
/export/users/haochenj/src/gcc/master/gcc/testsuite/gcc.target/i386/pr80969-4a.c
-m64 -DDEBUG -fdiagnostics-plain-output -Ofast -mabi=ms -mavx512f -lm -o
./pr80969-4a.exe
$ ./pr80969-4a.exe
Segmentation fault (core dumped)
After I debug into that, where it core dumped is the "printf ("PASSED\n");" in
avx-check.h.
We got:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7db887c in __strlen_evex () from /lib64/libc.so.6
It seems that the seg fault will only happen under -mabi=ms. If we eliminate
-mabi=ms, no segmentation fault is detected.