https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118198
Bug ID: 118198 Summary: GCC wrong debug information bug Product: gcc Version: 14.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: imchuncai at gmail dot com Target Milestone: --- Created attachment 59970 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59970&action=edit the preprocessed file 1. the exact version of GCC gcc version 14.2.1 20240912 (Red Hat 14.2.1-3) (GCC) 2. the system type x86_64-redhat-linux 3. the options given when GCC was configured/built gcc -std=gnu23 -O3 -g -Wall -Wextra -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations -fsanitize=undefined main.c 4. the complete command line that triggers the bug; ./a.out gdb a.out 5. the compiler output (error messages, warnings, etc.) the first run is fine, the second run will crash, and the debug info shows as follow: #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007ffff76a86d3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:78 #2 0x00007ffff764fc4e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007ffff7637902 in __GI_abort () at abort.c:79 #4 0x00000000004010b5 in must (x=<optimized out>) at main.c:9 #5 main () at main.c:41 6. what is wrong the actual crash is occurred at line 47, which is address is already in use.