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

--- Comment #8 from Kirill A. Korinsky <kirill at korins dot ky> ---
Just finished the test with gcc-12.5.0.

It fails.

My test was: build gcc-12.5.0 by clang18, and try to use gcc12 to build gcc12.

gdb session:

(gdb) r                                                                         
Starting program: /usr/ports/pobj/gcc-12.4.0/build-sparc64/gcc/cc1              
warning: File
"/usr/ports/pobj/kirill-gcc/gcc-12.4.0-by-clang18/usr/local/lib/libestdc++.so.21.0-gdb.py"
auto-loading has been declined by your `auto-load safe-path' set to
"/usr/local/share/gdb/auto-load".                                               
To enable execution of this file add                                            
        add-auto-load-safe-path
/usr/ports/pobj/kirill-gcc/gcc-12.4.0-by-clang18/usr/local/lib/libestdc++.so.21.0-gdb.py
line to your configuration file "/home/kmos/.config/gdb/gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/home/kmos/.config/gdb/gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"

Program received signal SIGSEGV, Segmentation fault.
0x00000017b3ae6728 in _Z29hash_table_higher_prime_indexm+0xfffffffffc6198e4@plt
()
(gdb) b _Z29hash_table_higher_prime_indexm+0xfffffffffc6198e4@plt
Breakpoint 1 at 0x17b3ae6718
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/ports/pobj/gcc-12.4.0/build-sparc64/gcc/cc1 
warning: File
"/usr/ports/pobj/kirill-gcc/gcc-12.4.0-by-clang18/usr/local/lib/libestdc++.so.21.0-gdb.py"
auto-loading has been declined by your `auto-load safe-path' set to
"/usr/local/share/gdb/auto-load".

Breakpoint 1, 0x000000f145ae6718 in
_Z29hash_table_higher_prime_indexm+0xfffffffffc6198e4@plt ()
(gdb) c
Continuing.

Breakpoint 1, 0x000000f145ae6718 in
_Z29hash_table_higher_prime_indexm+0xfffffffffc6198e4@plt ()
(gdb) bt
#0  0x000000f145ae6718 in
_Z29hash_table_higher_prime_indexm+0xfffffffffc6198e4@plt ()
#1  0x000000f144731d28 in hash_table<hash_map<void const*,
mem_usage_pair<vec_usage>, simple_hashmap_traits<default_hash_traits<void
const*>, mem_usage_pair<vec_usage> > >::hash_entry, false,
xcallocator>::hash_table (this=0xf36e1c5560, size=13, ggc=false,
sanitize_eq_and_hash=false, gather_mem_stats=false, 
    origin=HASH_MAP_ORIGIN) at
/usr/ports/pobj/gcc-12.4.0/gcc-12.4.0/gcc/hash-table.h:618
#2  0x000000f144730f88 in hash_map<void const*, mem_usage_pair<vec_usage>,
simple_hashmap_traits<default_hash_traits<void const*>,
mem_usage_pair<vec_usage> > >::hash_map (this=0xf36e1c5560, n=13, ggc=false,
sanitize_eq_and_hash=false, gather_mem_stats=false)
    at /usr/ports/pobj/gcc-12.4.0/gcc-12.4.0/gcc/hash-map.h:142
#3  0x000000f144730750 in
mem_alloc_description<vec_usage>::mem_alloc_description (this=0xf145deb518
<vec_mem_desc>)
    at /usr/ports/pobj/gcc-12.4.0/gcc-12.4.0/gcc/mem-stats.h:560
#4  0x000000f14472f52c in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=65535)
    at /usr/ports/pobj/gcc-12.4.0/gcc-12.4.0/gcc/vec.cc:114
#5  0x000000f14472f590 in
_GLOBAL__sub_I__ZN10vec_prefix17register_overheadEPvmm () at
/usr/ports/pobj/gcc-12.4.0/gcc-12.4.0/gcc/vec.cc:592
#6  0x000000f1421006a4 in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x000000f145ae6728 in _Z29hash_table_higher_prime_indexm+0xfffffffffc6198e4@plt
()
(gdb) bt
#0  0x000000f145ae6728 in
_Z29hash_table_higher_prime_indexm+0xfffffffffc6198e4@plt ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

Reply via email to