https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118537
--- Comment #4 from Julian Andres Klode <j...@jak-linux.org> --- I only have a huge ton of code so far, I can't minimize it easily, as it requires actually getting to the point where the constructor is called in the loop of the https downloader which happens _after_ headers are read! That said, https://magenta.jak-linux.org/bin/b0752bf2386d09d013a352c3dd8f6004-test-data.tar.gz contains the -save-temps output with as minimized arguments as possible, and a single compilation unit. $ /usr/bin/c++ -v -save-temps -g -O2 -I/home/ubuntu/apt/obj-aarch64-linux-gnu/include methods/http.cc -o http -lapt-pkg /usr/lib/aarch64-linux-gnu/libseccomp.so /usr/lib/aarch64-linux-gnu/libssl.so /usr/lib/aarch64-linux-gnu/libsystemd.so /usr/lib/aarch64-linux-gnu/libcrypto.so Using built-in specs. COLLECT_GCC=/usr/bin/c++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/14/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: aarch64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 14.2.0-12ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=aar ch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-ab i=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enab le-fix-cortex-a53-843419 --disable-werror --enable-offload-targets=nvptx-none=/build/gcc-14-5QJBTv/gcc-14-14.2.0/debian/tmp-nvptx/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-g nu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.2.0 (Ubuntu 14.2.0-12ubuntu1) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-O2' '-I' '/home/ubuntu/apt/obj-aarch64-linux-gnu/include' '-o' 'http' '-foffload-options=-l_GCC_m' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'http-' /usr/libexec/gcc/aarch64-linux-gnu/14/cc1plus -E -quiet -v -I /home/ubuntu/apt/obj-aarch64-linux-gnu/include -imultiarch aarch64-linux-gnu -D_GNU_SOURCE methods/http.cc -mlittle-endian -mabi=lp64 -foffload-options=-l_GCC_m -g -fworking-directory -O2 -fpch-preprocess -D_FORTIFY_SOURC E=3 -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -o http-http.ii ignoring duplicate directory "/usr/include/aarch64-linux-gnu/c++/14" ignoring nonexistent directory "/usr/local/include/aarch64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/14/include-fixed/aarch64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/14/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/14/../../../../aarch64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/ubuntu/apt/obj-aarch64-linux-gnu/include /usr/include/c++/14 /usr/include/aarch64-linux-gnu/c++/14 /usr/include/c++/14/backward /usr/lib/gcc/aarch64-linux-gnu/14/include /usr/local/include /usr/include/aarch64-linux-gnu /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-O2' '-I' '/home/ubuntu/apt/obj-aarch64-linux-gnu/include' '-o' 'http' '-foffload-options=-l_GCC_m' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'http-' /usr/libexec/gcc/aarch64-linux-gnu/14/cc1plus -fpreprocessed http-http.ii -D_FORTIFY_SOURCE=3 -quiet -dumpdir http- -dumpbase http.cc -dumpbase-ext .cc -mlittle-endian -mabi=lp64 -g -O2 -version -foffload-options=-l_GCC_m -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -o http-http.s GNU C++17 (Ubuntu 14.2.0-12ubuntu1) version 14.2.0 (aarch64-linux-gnu) compiled by GNU C version 14.2.0, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.27-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: a59556748b8e9af2aa523bc603d003f8 COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-O2' '-I' '/home/ubuntu/apt/obj-aarch64-linux-gnu/include' '-o' 'http' '-foffload-options=-l_GCC_m' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'http-' as -v -I /home/ubuntu/apt/obj-aarch64-linux-gnu/include --gdwarf-5 -EL -mabi=lp64 -o http-http.o http-http.s GNU assembler version 2.43.50 (aarch64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.43.50.20241230 COMPILER_PATH=/usr/libexec/gcc/aarch64-linux-gnu/14/:/usr/libexec/gcc/aarch64-linux-gnu/14/:/usr/libexec/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/14/:/usr/lib/gcc/aarch64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/14/:/usr/lib/gcc/aarch64-linux-gnu/14/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/14/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/14/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-O2' '-I' '/home/ubuntu/apt/obj-aarch64-linux-gnu/include' '-o' 'http' '-foffload-options=-l_GCC_m' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'http.' /usr/libexec/gcc/aarch64-linux-gnu/14/collect2 -plugin /usr/libexec/gcc/aarch64-linux-gnu/14/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/aarch64-linux-gnu/14/lto-wrapper -plugin-opt=-fresolution=http.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu --as-needed -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux --fix-cortex-a53-843419 -pie -z now -z relro -o http /usr/lib/gcc/aarch64-linux-gnu/14/../../../aarch64-linux-gnu/Scrt1.o /usr/lib/gcc/aarch64-linux-gnu/14/../../../aarch64-linux-gnu/crti.o /usr/lib/gcc/aarch64-linux-gnu/14/crtbeginS.o -L/usr/lib/gcc/aarch64-linux-gnu/14 -L/usr/lib/gcc/aarch64-linux-gnu/14/../../../aarch64-linux-gnu -L/usr/lib/gcc/aarch64-linux-gnu/14/../../../../lib -L/lib/aarch64-linux-gnu -L/lib/../lib -L/usr/lib/aarch64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/aarch64-linux-gnu/14/../../.. http-http.o -lapt-pkg /usr/lib/aarch64-linux-gnu/libseccomp.so /usr/lib/aarch64-linux-gnu/libssl.so /usr/lib/aarch64-linux-gnu/libsystemd.so /usr/lib/aarch64-linux-gnu/libcrypto.so -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/aarch64-linux-gnu/14/crtendS.o /usr/lib/gcc/aarch64-linux-gnu/14/../../../aarch64-linux-gnu/crtn.o COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-O2' '-I' '/home/ubuntu/apt/obj-aarch64-linux-gnu/include' '-o' 'http' '-foffload-options=-l_GCC_m' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'http.' The symptoms can then be reproduced by $ rm /tmp/InRelease ; ( cat test-input; sleep 60 ) | ./http [...] </tmp/InRelease should not be 0 now, but is> Frankly the problem is how to reduce this to a sensible test case as we can only produce the outcome so far when the code produces a binary that can fetch code. I can try to stuff in an assert() and then run cvise on that perhaps?