public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113534] New: printf might report segmentation fault under -mabi=ms
@ 2024-01-22  2:43 haochen.jiang at intel dot com
  2024-01-22  2:48 ` [Bug target/113534] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: haochen.jiang at intel dot com @ 2024-01-22  2:43 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/113534] printf might report segmentation fault under -mabi=ms
  2024-01-22  2:43 [Bug target/113534] New: printf might report segmentation fault under -mabi=ms haochen.jiang at intel dot com
@ 2024-01-22  2:48 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-22  2:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113534

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is NOT a bug as -mabi=ms changes the ABI of all of the function calls
including extern ones.


Basically if you mark printf as having the GNU ABI, then it would work.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-22  2:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-22  2:43 [Bug target/113534] New: printf might report segmentation fault under -mabi=ms haochen.jiang at intel dot com
2024-01-22  2:48 ` [Bug target/113534] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).