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

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Sam James from comment #1)
> With export
> UBSAN_OPTIONS="halt_on_error=1:abort_on_error=1:print_summary=1:
> print_stacktrace=1", you should be able to get a nice backtrace. You can
> drop the halt/abort bits if you want.

Stack backtrace:

    #1 0x00000136bc13 in memrefs_conflict_p ../../trunk/gcc/alias.cc:2539
    #2 0x0000013797fb in write_dependence_p ../../trunk/gcc/alias.cc:3114
    #3 0x00000137a4ae in canon_anti_dependence(rtx_def const*, bool, rtx_def
const*, machine_mode, rtx_def*) ../../trunk/gcc/alias.cc:3143
    #4 0x00000173e48b in cselib_invalidate_mem ../../trunk/gcc/cselib.cc:2760
    #5 0x000001745087 in cselib_process_insn(rtx_insn*)
../../trunk/gcc/cselib.cc:3327
    #6 0x000002a8a06d in reload_cse_regs_1 ../../trunk/gcc/postreload.cc:323
    #7 0x000002a99f08 in reload_cse_regs ../../trunk/gcc/postreload.cc:66
    #8 0x000002a99f08 in execute ../../trunk/gcc/postreload.cc:2461
    #9 0x000002a1997d in execute_one_pass(opt_pass*)
../../trunk/gcc/passes.cc:2659

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../../trunk/gcc/poly-int.h:776:5
during RTL pass: postreload
../../../trunk/libgomp/env.c: In function ‘parse_schedule’:
../../../trunk/libgomp/env.c:245:1: internal compiler error: Aborted

Line numbers are for a git pull this morning:

trunk $ git log | head
commit d171f214a43b1b18f1fc9b6aa1fc8a9e8c50953c
Author: Xi Ruoyao <xry...@xry111.site>
Date:   Wed Feb 5 09:16:19 2025 +0800

Also:

Configuring stage 2 in x86_64-pc-linux-gnu/libstdc++-v3
../../trunk/gcc/poly-int.h:776:5: runtime error: signed integer overflow:
-9223372036854775807 + -8 cannot be represented in type 'long int'
working $  set | grep UBSAN
UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1
working $ 

and

/home/dcb40b/gcc/working/./gcc/xgcc -B/home/dcb40b/gcc/working/./gcc/
-B/home/dcb40b/gcc/results.20250211/x86_64-pc-linux-gnu/bin/
-B/home/dcb40b/gcc/results.20250211/x86_64-pc-linux-gnu/lib/ -isystem
/home/dcb40b/gcc/results.20250211/x86_64-pc-linux-gnu/include -isystem
/home/dcb40b/gcc/results.20250211/x86_64-pc-linux-gnu/sys-include -fno-checking
-DHAVE_CONFIG_H -I. -I../../../trunk/libgomp
-I../../../trunk/libgomp/config/linux/x86 -I../../../trunk/libgomp/config/linux
-I../../../trunk/libgomp/config/posix -I../../../trunk/libgomp
-I../../../trunk/libgomp/../include -Wall -ftls-model=initial-exec -pthread
-DUSING_INITIAL_EXEC_TLS -fcf-protection -mshstk -g -g1 -O2 -march=native -MT
work.lo -MD -MP -MF .deps/work.Tpo -c ../../../trunk/libgomp/work.c -o work.o
>/dev/null 2>&1
../../trunk/gcc/poly-int.h:776:5: runtime error: signed integer overflow:
-9223372036854775807 + -8 cannot be represented in type 'long int'
no

Reply via email to