https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123840
Bug ID: 123840
Summary: ICE in bp_unpack_string when linking unpacked objects
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: jmelcr at gcc dot gnu.org
Target Milestone: ---
Created attachment 63496
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63496&action=edit
object file retrieved from an unpacked static library
~/gcc/build/bisect/install/bin/g++ repro.o
lto1: internal compiler error: Segmentation fault
0x247a8cd internal_error(char const*, ...)
/home/jmelcr/gcc/src/gcc/gcc/diagnostic-global-context.cc:787
0x10a2aaf crash_signal
/home/jmelcr/gcc/src/gcc/gcc/toplev.cc:325
0xb25a0c bp_unpack_string(data_in*, bitpack_d*)
/home/jmelcr/gcc/src/gcc/gcc/data-streamer-in.cc:114
0xf618c4 cl_optimization_stream_in(data_in*, bitpack_d*, cl_optimization*)
/home/jmelcr/gcc/build/bisect/objs/gcc/options-save.cc:14627
0x1354440 streamer_read_tree_bitfields(lto_input_block*, data_in*, tree_node*)
/home/jmelcr/gcc/src/gcc/gcc/tree-streamer-in.cc:566
0xec0dd9 lto_read_tree_1
/home/jmelcr/gcc/src/gcc/gcc/lto-streamer-in.cc:1722
0xec0d3a lto_read_tree
/home/jmelcr/gcc/src/gcc/gcc/lto-streamer-in.cc:1797
0xec0d3a lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
/home/jmelcr/gcc/src/gcc/gcc/lto-streamer-in.cc:1942
0xec1138 lto_input_scc(lto_input_block*, data_in*, unsigned int*, unsigned
int*, bool)
/home/jmelcr/gcc/src/gcc/gcc/lto-streamer-in.cc:1826
0xa6b546 lto_read_decls
/home/jmelcr/gcc/src/gcc/gcc/lto/lto-common.cc:1922
0xa6c35c lto_file_finalize
/home/jmelcr/gcc/src/gcc/gcc/lto/lto-common.cc:2310
0xa6c35c lto_create_files_from_ids
/home/jmelcr/gcc/src/gcc/gcc/lto/lto-common.cc:2320
0xa6c35c lto_file_read
/home/jmelcr/gcc/src/gcc/gcc/lto/lto-common.cc:2375
0xa6c35c read_cgraph_and_symbols(unsigned int, char const**)
/home/jmelcr/gcc/src/gcc/gcc/lto/lto-common.cc:2829
0xa4b552 lto_main()
/home/jmelcr/gcc/src/gcc/gcc/lto/lto.cc:663
/home/jmelcr/gcc/build/bisect/install/libexec/gcc/x86_64-pc-linux-gnu/16.0.1/lto1
-quiet -dumpbase ./a.wpa -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2
-mfpmath=sse -mtune=generic -march=x86-64 -g -O2 -O2 -fno-openmp -fno-openacc
-fcf-protection=none -funwind-tables -fasynchronous-unwind-tables -fPIC
-fltrans-output-list=/tmp/cct32oiw.ltrans.out -fwpa=16
-fresolution=/tmp/ccLoDeYy.res -flinker-output=exec @/tmp/cczg9QLX
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: /home/jmelcr/gcc/build/bisect/install/bin/g++
returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Using built-in specs.
COLLECT_GCC=/home/jmelcr/gcc/build/bisect/install/bin/g++
COLLECT_LTO_WRAPPER=/home/jmelcr/gcc/build/bisect/install/libexec/gcc/x86_64-pc-linux-gnu/16.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/jmelcr/gcc/src/gcc/configure
--prefix=/home/jmelcr/gcc/build/bisect/install --enable-languages=c,c++
--disable-bootstrap : (reconfigured) /home/jmelcr/gcc/src/gcc/configure
--prefix=/home/jmelcr/gcc/build/bisect/install --disable-bootstrap
--enable-languages=c,c++,lto --no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260127 (experimental) (GCC)
I am working on an ICE in blender. While reducing, I unpacked several static
libraries, every single one of the objects I got produces this error. I am
sorry for the object file reproducer, but I couldn't get this to work with
code. The commands are long, so I will refer to this log:
https://build.opensuse.org/build/home:rguenther:plgrnd/openSUSE_Factory/x86_64/blender-4.5/_log
[2853/6419] produces the object file
[5196/6419] creates the static library
I got the object with `ar x libcycles_device.a`. I have very little idea what
is happening, I presume I am doing something wrong. I am mainly filing this
because I don't think we should ICE even if the user is doing something
incorrectly.