Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940571 - sys-devel/gcc-14: ICE when building app-cdr/redumper::tatsh-overlay
Summary: sys-devel/gcc-14: ICE when building app-cdr/redumper::tatsh-overlay
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-14
  Show dependency tree
 
Reported: 2024-10-01 01:24 UTC by Andrew Udvare
Modified: 2024-10-28 23:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log with CXXFLAGS=-save-temps (redumper-411-ice-save-temps-build.log,8.33 KB, text/x-log)
2024-10-01 01:27 UTC, Andrew Udvare
Details
Build log (redumper-411-ice-build.log,97.32 KB, text/x-log)
2024-10-01 01:28 UTC, Andrew Udvare
Details
Work directory, compiled with -save-temps (redumper-411-ice-save-temps-work.tar.zst,547.02 KB, application/zstd)
2024-10-01 01:33 UTC, Andrew Udvare
Details
Testcase (redumper-case.tar.zst,150.59 KB, application/zstd)
2024-10-01 22:17 UTC, Andrew Udvare
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2024-10-01 01:24:19 UTC
The package builds fine with Clang.

Ebuild: https://github.com/gentoo-mirror/tatsh-overlay/blob/master/app-cdr/redumper/redumper-411.ebuild

Requires setting USE=-clang by force to test this.

MAKEOPTS=-j1 CFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe" will cause an ICE:

[31mFAILED: [0mCMakeFiles/redumper.dir/utils/hex_bin.ixx.o CMakeFiles/redumper.dir/utils.hex_bin.gcm 
/usr/bin/x86_64-pc-linux-gnu-g++ -DREDUMPER_VERSION_BUILD=LOCAL -DREDUMPER_VERSION_MAJOR=2024 -DREDUMPER_VERSION_MINOR=09 -DREDUMPER_VERSION_PATCH=30 -I/var/tmp/portage/app-cdr/redumper-411/work/redumper-build_411 -I/var/tmp/portage/app-cdr/redumper-411/work/redumper-build_411_build -I/var/tmp/portage/app-cdr/redumper-411/work/redumper-build_411/utils  -flto=auto -ggdb -march=native -mtune=native -pipe -freport-bug -std=gnu++20 -Wall -Wextra -Werror --param=ggc-min-expand=10000 -MD -MT CMakeFiles/redumper.dir/utils/hex_bin.ixx.o -MF CMakeFiles/redumper.dir/utils/hex_bin.ixx.o.d -fmodules-ts -fmodule-mapper=CMakeFiles/redumper.dir/utils/hex_bin.ixx.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o CMakeFiles/redumper.dir/utils/hex_bin.ixx.o -c /var/tmp/portage/app-cdr/redumper-411/work/redumper-build_411/utils/hex_bin.ixx
during IPA pass: *free_lang_data
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/cctype:42,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/localefwd.h:42,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/ios_base.h:40,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/iomanip:42,
                 from /var/tmp/portage/app-cdr/redumper-411/work/redumper-build_411/utils/hex_bin.ixx:4:
/usr/include/ctype.h:47:1: internal compiler error: in write_unnamed_type_name, at cp/mangle.cc:1806
   47 | {
      | ^
0x5580c9c721ec write_unnamed_type_name
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/cp/mangle.cc:1806
0x5580c9c721ec write_unqualified_name
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/cp/mangle.cc:1589
0x5580cabf7732 write_class_enum_type
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/cp/mangle.cc:3096
0x5580cabf7732 write_type
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/cp/mangle.cc:2515
0x5580caa0ecf0 mangle_decl_string
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/cp/mangle.cc:4418
0x5580caa0dd87 get_mangled_id
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/cp/mangle.cc:4441
0x5580caa0dd87 mangle_decl(tree_node*)
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/cp/mangle.cc:4479
0x5580caa5cd07 decl_assembler_name(tree_node*)
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/tree.cc:719
0x5580caa5cd07 assign_assembler_name_if_needed(tree_node*)
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/tree.cc:834
0x5580caa5cd07 assign_assembler_name_if_needed(tree_node*)
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/tree.cc:816
0x5580cb0ab215 free_lang_data_in_cgraph
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/ipa-free-lang-data.cc:1064
0x5580cb0ab215 free_lang_data
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/ipa-free-lang-data.cc:1109
0x5580cb0ab215 execute
	/usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/ipa-free-lang-data.cc:1176

With jobs set to higher than 1, a different error occurs along with the ICE but I will worry about that one later.

With -save-temps alone, an ICE occurs on the first file.

FAILED: CMakeFiles/generate_offsets.dir/generate_offsets.cc.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DREDUMPER_VERSION_BUILD=LOCAL -DREDUMPER_VERSION_MAJOR=2024 -DREDUMPER_VERSION_MINOR=09 -DREDUMPER_VERSION_PATCH=30   -save-temps -std=gnu++20 -Wall
-Wextra -Werror --param=ggc-min-expand=10000 -MD -MT CMakeFiles/generate_offsets.dir/generate_offsets.cc.o -MF CMakeFiles/generate_offsets.dir/generate_offsets.cc.o.d -fmodules-ts -fm
odule-mapper=CMakeFiles/generate_offsets.dir/generate_offsets.cc.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o CMakeFiles/generate_offsets.dir/generate_offsets.cc.o -c /var/tmp/portage
/app-cdr/redumper-411/work/redumper-build_411/generate_offsets.cc

Segmentation fault
   80 | }
      | ^
0x55ce1a665f31 crash_signal
        /usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/toplev.cc:319
0x7f0e547e273f ???
        /usr/src/debug/sys-libs/glibc-2.40-r3/glibc-2.40/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7f0e548f8c5c __strlen_evex
        ../sysdeps/x86_64/multiarch/strlen-evex-base.S:81
0x55ce1ac925f5 pp_string(pretty_printer*, char const*)
        /usr/src/debug/sys-devel/gcc-14.2.1_p20240921/gcc-14-20240921/gcc/pretty-print.cc:2238

Reproducible: Always

Steps to Reproduce:
1. Add my overlay
2. env USE=-clang emerge -1 redumper
Actual Results:  
ICE in GCC.

Expected Results:  
Should not ICE.

# emerge --info
Portage 3.0.66.1 (python 3.12.6-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-14, glibc-2.40-r3, 6.11.0-gentoo-limelight x86_64)
=================================================================
System uname: Linux-6.11.0-gentoo-limelight-x86_64-11th_Gen_Intel-R-_Core-TM-_i9-11900K_@_3.50GHz-with-glibc2.40
KiB Mem:    65707648 total,  16529144 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 30 Sep 2024 05:30:00 +0000
Head commit of repository gentoo: 37056b1e1808826b67013d4aea99941da8863026
Head commit of repository brave-overlay: 33ad762989aa29751ba981315406a9197d3e1b92

Head commit of repository guru: 6d173fbed08d3c20266c2825f05c414dab51d689

Timestamp of repository menelkir: Wed, 25 Sep 2024 11:19:18 +0000
Head commit of repository menelkir: 5f5b20208445b2295eb0f5b97c49fdb7aa4c607d

Timestamp of repository pentoo: Sat, 28 Sep 2024 07:21:10 +0000
Head commit of repository pentoo: e81c5eb0b124172f92227c86aeab73204c77cb98

Head commit of repository tatsh-overlay: 091ffb26fbff666ef21f1180052d0c68c0d692a7

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p2) 2.43.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo, 1.17-r1::gentoo
dev-build/cmake:           3.30.3::gentoo
dev-build/libtool:         2.5.3::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.5.2::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.10_p1::gentoo, 3.12.6_p4::gentoo
dev-lang/rust:             1.81.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-apps/systemd:          256.6::gentoo
sys-devel/binutils:        2.43-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo, 19.1.0::gentoo
sys-devel/gcc:             12.4.1_p20240919::gentoo, 14.2.1_p20240921::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             18.1.8::gentoo
sys-devel/llvm:            14.0.6-r5::tatsh-overlay, 17.0.6-r3::gentoo, 18.1.8-r4::gentoo, 19.1.0::gentoo
sys-kernel/linux-headers:  6.10::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

tatsh-overlay
    location: /var/db/repos/tatsh
    sync-type: git
    sync-uri: https://github.com/Tatsh/tatsh-overlay.git
    masters: gentoo
    volatile: False
    sync-git-verify-commit-signature: no

Installed sets: @admin, @android, @bashcomp, @cdr, @charles, @chrome, @cups, @dbeaver, @disney, @emulators, @exfat, @firefox, @fonts, @gimp, @git, @haskell, @i3, @ibus, @kde, @kernel, @libimobiledevice, @libreoffice, @media, @misc, @mlocate, @mupen64plus, @nfs, @pass, @portage-utilities, @python, @qemu, @rar, @retroarch, @sm64, @stepmania, @thunderbird, @tmux, @vim, @virtualbox, @vscode, @wine, @x11, @xirvik-vpn, @yt-dlp
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 17 --quiet-build=y --usepkg --verbose-conflicts --buildpkg-exclude 'acct-*/* app-arch/rar app-emulation/virtualbox-extpack-oracle app-emulation/virtualbox-modules */*-bin dev-util/intel-ocl-sdk games-util/steam-launcher media-fonts/* media-video/magewell-pro-capture media-video/makemkv net-im/ripcord sys-kernel/linux-firmware sys-kernel/*-sources virtual/* media-video/cxadc *-drivers/* sys-apps/systemd www-client/google-chrome*'"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://www.gtlib.gatech.edu/pub/gentoo https://mirrors.rit.edu/gentoo/"
INSTALL_MASK="/boot/amd-uc.img /etc/avahi/services/sftp-ssh.service /etc/conf.d /etc/cron.daily /etc/cron.monthly /etc/cron.weekly /etc/dracut.conf /etc/grub.d /etc/init.d /etc/modules-load.d/ddccontrol-i2c-dev.conf /etc/portage/savedconfig/sys-kernel/linux-firmware-* /etc/xdg/menus/applications-merged/lsp-plugins.menu /etc/xdg/autostart/org.kde.plasma-welcome.desktop /usr/lib/modules-load.d/fwupd-msr.conf /usr/lib/modules-load.d/joycond.conf /usr/lib/rc"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en en_GB en_US"
MAKEOPTS="--jobs=17 --load-average=17"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac aacs acl acpi activities aio alsa amd64 aptx avahi bash-completion bluetooth bluray branding bzip2 cairo cdda cddb cdio cdr cet cjk clang colord crypt cuda cups curl dav1d dbus declarative dri dts dvb dvd dvdr egl encode exif faudio ffmpeg flac fluidsynth gamepad gdbm gif gles2 gpm gsm gstreamer gui hardened heif hwaccel ibus iconv icu idn ipv6 jack jemalloc joystick jpeg jpeg2k kde kf6compat kwallet lame lcms ldac libass libcaca libnotify libretro libtirpc lm-sensors lto lv2 lvm lz4 lzma mad man matroska mng mod modplug modules-sign mp3 mp4 mpeg multilib ncurses nls nvenc offensive ogg opencl opengl openmp opus pam pango pcre pdf pgo pic pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 rar readline samba screencast sdl seccomp semantic-desktop snappy sound speex spell ssl startup-notification svg syslog system-av1 system-binutils system-boost system-bootloader system-cmark system-crontab system-ffmpeg system-harfbuzz system-heimdal system-info system-ipxe system-jpeg system-jsoncpp system-lcms system-leveldb system-libcxx system-libevent system-libs system-libvpx system-libyaml system-llvm system-lua system-lz4 system-mathjax system-mesa system-mitkrb5 system-numpy system-png system-python system-qemu system-seabios system-sqlite system-ssl system-tbb system-webp system-wfconfig system-wide system-wlroots system-zlib systemd taglib test-rust theora threads tiff tpm truetype twolame udev udisks unicode upower usb v4l vaapi vcd vdpau vim-syntax vlc vorbis vpx vulkan wavpack wayland webengine webp widgets wmf wxwidgets x264 x265 xattr xcb xft xinerama xml xpm xv xvid xxhash zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev libinput joystick wacom" KERNEL="linux" L10N="en en-GB en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="ppc x86_64" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Andrew Udvare 2024-10-01 01:27:23 UTC
Created attachment 904419 [details]
build log with CXXFLAGS=-save-temps
Comment 2 Andrew Udvare 2024-10-01 01:28:43 UTC
Created attachment 904420 [details]
Build log
Comment 3 Andrew Udvare 2024-10-01 01:29:37 UTC
Build log without -save-temps above shows a different crash.
Comment 4 Andrew Udvare 2024-10-01 01:33:20 UTC
Created attachment 904421 [details]
Work directory, compiled with -save-temps
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-01 02:16:45 UTC
Can you upload a standalone testcase please?

Run the command which fails manually in the builddir with -save-temps, then copy the .ii it makes to /tmp/foo or whatever, then run the command again in there but with the path to .cc replaced by .ii so it's standalone.
Comment 6 Andrew Udvare 2024-10-01 22:17:01 UTC
Created attachment 904629 [details]
Testcase

.ii file and required modmap file.

Extract and run `make`. The failing command:

/usr/bin/x86_64-pc-linux-gnu-g++ -flto=auto -ggdb -march=native -mtune=native -std=gnu++20 -fmodules-ts -fmodule-mapper=hex_bin.ixx.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o hex_bin.ixx.o -c hex_bin.ixx.ii -freport-bug
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-01 23:38:22 UTC
Thanks, forwarded upstream at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116929.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-28 23:20:48 UTC
Fixed in:

commit 8091263bb4a3107216a468588dfdd905cb0324f1
Author: Sam James <sam@gentoo.org>
Date:   Sun Oct 27 02:06:30 2024 +0000

    sys-devel/gcc: add 14.2.1_p20241026

    Signed-off-by: Sam James <sam@gentoo.org>

Thanks for the report.