public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sjames at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113907] New: [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41 Date: Tue, 13 Feb 2024 12:49:02 +0000 [thread overview] Message-ID: <bug-113907-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907 Bug ID: 113907 Summary: [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org CC: amacleod at redhat dot com, arsen at gcc dot gnu.org Target Milestone: --- Originally reported downstream in Gentoo at https://bugs.gentoo.org/924153. ICU seems miscompiled on x86 (-m32) since r14-5109-ga291237b628f41. My C++ is ~non-existent so I can't reduce it. I appreciate this isn't a great level of detail. It crashes during the build when running a just-built executable: ``` i686-pc-linux-gnu-g++ -D_REENTRANT -DU_DEBUG=1 -DU_HAVE_ELF_H=1 -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=0 -DU_DISABLE_RENAMING=1 -I/var/tmp/portage/dev-libs/icu-74.2/work/icu/source/common -I/var/tmp/portage/dev-libs/icu-74.2/work/icu/source/tools/icupkg/../toolutil -DU_ATTRIBUTE_DEPRECATED= -O2 -march=i686 -pipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -std=c++14 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -c -o icupkg.o /var/tmp/portage/dev-libs/icu-74.2/work/icu/source/tools/icupkg/icupkg.cpp [..] i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -std=c++14 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -o ../../bin/icupkg icupkg.o -L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata -lpthread -lm [...] Unpacking /var/tmp/portage/dev-libs/icu-74.2/work/icu/source/data/in/icudt74l.dat and generating out/tmp/icudata.lst (list of data files) LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg -d ./out/build/icudt74l --list -x \* /var/tmp/portage/dev-libs/icu-74.2/work/icu/source/data/in/icudt74l.dat -o out/tmp/icudata.lst make[1]: *** [Makefile:272: out/tmp/icudata.lst] Segmentation fault make[1]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/var/tmp/portage/dev-libs/icu-74.2/work/icu/source-abi_x86_32.x86/data' make[1]: Leaving directory '/var/tmp/portage/dev-libs/icu-74.2/work/icu/source-abi_x86_32.x86/data' make: *** [Makefile:153: all-recursive] Error 2 * ERROR: dev-libs/icu-74.2::gentoo failed (compile phase): * emake failed ``` Valgrind says: ``` ==26485== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==26485== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info ==26485== Command: ../bin/icupkg -d ./out/build/icudt74l --list -x * /var/tmp/portage/dev-libs/icu-74.1/work/icu/source/data/in/icudt74l.dat -o out/tmp/icudata.lst ==26485== ==26485== Invalid write of size 1 ==26485== at 0x52A0110: memcpy (string_fortified.h:29) ==26485== by 0x52A0110: uprv_copyArray64 (udataswp.cpp:172) ==26485== by 0x52A0110: uprv_copyArray16(UDataSwapper const*, void const*, int, void*, UErrorCode*) (udataswp.cpp:160) ==26485== by 0x52A0630: udata_swapDataHeader (udataswp.cpp:342) ==26485== by 0x48694F1: icu::Package::readPackage(char const*) (package.cpp:483) ==26485== by 0x10987F: main (icupkg.cpp:335) ==26485== Address 0x54f2458 is 0 bytes after a block of size 201,216 alloc'd ==26485== at 0x4842E4D: operator new(unsigned int) (vg_replace_malloc.c:476) ==26485== by 0x10936B: main (icupkg.cpp:285) ``` Manual reproduction steps: ``` ./configure CC="gcc -m32" CXX="g++ -m32" CFLAGS="-O2 -ggdb3 -march=i686" CXXFLAGS="-O2 -ggdb3 -march=i686" --disable-renaming --disable-layoutex --disable-samples make -j$(nproc) ``` There's some suspicious code there wrt reinterpret_cast but -fno-strict-aliasing doesn't help. It's fine with -O1, but not -O2.
next reply other threads:[~2024-02-13 12:49 UTC|newest] Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-13 12:49 sjames at gcc dot gnu.org [this message] 2024-02-13 12:55 ` [Bug middle-end/113907] " sjames at gcc dot gnu.org 2024-02-13 13:00 ` sjames at gcc dot gnu.org 2024-02-13 13:00 ` rguenth at gcc dot gnu.org 2024-02-13 13:14 ` jakub at gcc dot gnu.org 2024-02-13 14:17 ` sjames at gcc dot gnu.org 2024-02-13 14:18 ` sjames at gcc dot gnu.org 2024-02-13 14:19 ` sjames at gcc dot gnu.org 2024-02-13 14:22 ` sjames at gcc dot gnu.org 2024-02-13 14:23 ` sjames at gcc dot gnu.org 2024-02-13 14:24 ` sjames at gcc dot gnu.org 2024-02-13 14:49 ` jakub at gcc dot gnu.org 2024-02-13 14:55 ` pinskia at gcc dot gnu.org 2024-02-13 14:56 ` sjames at gcc dot gnu.org 2024-02-13 14:58 ` sjames at gcc dot gnu.org 2024-02-13 15:11 ` jakub at gcc dot gnu.org 2024-02-13 15:17 ` pinskia at gcc dot gnu.org 2024-02-13 15:19 ` sjames at gcc dot gnu.org 2024-02-13 15:36 ` jakub at gcc dot gnu.org 2024-02-13 15:40 ` pinskia at gcc dot gnu.org 2024-02-13 15:46 ` jakub at gcc dot gnu.org 2024-02-13 15:58 ` jakub at gcc dot gnu.org 2024-02-13 16:00 ` pinskia at gcc dot gnu.org 2024-02-13 16:01 ` pinskia at gcc dot gnu.org 2024-02-13 16:07 ` jakub at gcc dot gnu.org 2024-02-13 16:30 ` jakub at gcc dot gnu.org 2024-02-14 9:16 ` jakub at gcc dot gnu.org 2024-02-14 9:24 ` rguenth at gcc dot gnu.org 2024-02-14 9:25 ` rguenth at gcc dot gnu.org 2024-02-14 9:52 ` jakub at gcc dot gnu.org 2024-02-14 10:35 ` rguenther at suse dot de 2024-02-14 15:52 ` hubicka at gcc dot gnu.org 2024-02-14 15:56 ` jakub at gcc dot gnu.org 2024-02-15 10:25 ` sjames at gcc dot gnu.org 2024-02-15 14:25 ` hubicka at gcc dot gnu.org 2024-02-15 14:36 ` jakub at gcc dot gnu.org 2024-02-15 14:36 ` jakub at gcc dot gnu.org 2024-02-15 14:43 ` rguenther at suse dot de 2024-02-15 14:45 ` rguenther at suse dot de 2024-02-15 14:55 ` hubicka at ucw dot cz 2024-02-15 14:57 ` hubicka at ucw dot cz 2024-02-15 15:02 ` jakub at gcc dot gnu.org 2024-02-16 14:40 ` hubicka at gcc dot gnu.org 2024-02-16 15:10 ` jakub at gcc dot gnu.org 2024-02-16 15:52 ` [Bug middle-end/113907] [12/13/14 " hubicka at gcc dot gnu.org 2024-02-16 15:55 ` jakub at gcc dot gnu.org 2024-02-16 16:08 ` hubicka at ucw dot cz 2024-02-16 16:27 ` jakub at gcc dot gnu.org 2024-02-16 16:45 ` hubicka at ucw dot cz 2024-02-16 17:01 ` amacleod at redhat dot com 2024-02-16 20:42 ` amacleod at redhat dot com 2024-02-22 9:22 ` sjames at gcc dot gnu.org 2024-03-08 15:34 ` jakub at gcc dot gnu.org 2024-03-09 17:10 ` law at gcc dot gnu.org 2024-03-09 21:04 ` [Bug ipa/113907] " pinskia at gcc dot gnu.org 2024-03-09 21:06 ` [Bug ipa/113907] [11/12/13/14 " pinskia at gcc dot gnu.org 2024-03-09 21:11 ` pinskia at gcc dot gnu.org 2024-03-11 11:21 ` jakub at gcc dot gnu.org 2024-03-13 14:07 ` hubicka at gcc dot gnu.org 2024-03-13 14:14 ` jakub at gcc dot gnu.org 2024-03-13 15:21 ` hubicka at ucw dot cz 2024-03-14 16:20 ` hubicka at gcc dot gnu.org 2024-03-14 16:39 ` hubicka at gcc dot gnu.org 2024-03-14 16:49 ` cvs-commit at gcc dot gnu.org 2024-03-14 16:53 ` jakub at gcc dot gnu.org 2024-03-15 23:29 ` cvs-commit at gcc dot gnu.org 2024-03-19 17:09 ` jakub at gcc dot gnu.org 2024-03-19 18:41 ` hubicka at ucw dot cz 2024-03-20 9:05 ` jamborm at gcc dot gnu.org 2024-03-20 18:13 ` jamborm at gcc dot gnu.org 2024-03-20 18:33 ` jakub at gcc dot gnu.org 2024-03-21 15:29 ` jakub at gcc dot gnu.org 2024-03-28 12:25 ` [Bug ipa/113907] [11/12/13/14 regression] ICU miscompiled " cvs-commit at gcc dot gnu.org 2024-04-02 8:44 ` hubicka at ucw dot cz 2024-04-04 21:17 ` jamborm at gcc dot gnu.org 2024-04-08 9:33 ` sjames at gcc dot gnu.org 2024-04-08 9:38 ` rguenth at gcc dot gnu.org 2024-04-08 16:56 ` cvs-commit at gcc dot gnu.org 2024-04-08 17:04 ` jamborm at gcc dot gnu.org 2024-04-09 9:47 ` Jan Hubicka 2024-04-09 9:47 ` hubicka at ucw dot cz 2024-05-07 7:45 ` [Bug ipa/113907] [11/12/13/14/15 " rguenth at gcc dot gnu.org 2024-05-14 15:06 ` cvs-commit at gcc dot gnu.org 2024-05-28 13:45 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113907-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).