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 c++/109868] New: [13/14 regression] ICE: segmentation fault when building small C++ program Date: Mon, 15 May 2023 22:37:09 +0000 [thread overview] Message-ID: <bug-109868-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109868 Bug ID: 109868 Summary: [13/14 regression] ICE: segmentation fault when building small C++ program Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org CC: amonakov at gcc dot gnu.org Target Milestone: --- I originally reported this at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109806#c12. For me, this crashes on x86_64-gentoo-linux-musl: ``` struct SimpleRefCounted { virtual void addRef(); }; struct timespec { long tv_nsec; int : 0; }; struct ClockImpl : SimpleRefCounted { timespec _startTime; }; struct Clock { Clock(); }; Clock::Clock() { ClockImpl(); } ``` with: ``` # g++ /tmp/foo.cxx -O2 -wrapper valgrind ==1239523== Memcheck, a memory error detector ==1239523== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==1239523== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info ==1239523== Command: /usr/libexec/gcc/x86_64-gentoo-linux-musl/13/cc1plus -quiet -D_GNU_SOURCE /tmp/foo.cxx -quiet -dumpdir a- -dumpbase foo.cxx -dumpbase-ext .cxx -mtune=generic -march=x86-64 -O2 -fcf-protection -o /tmp/ccigHfiN.s ==1239523== ==1239523== Invalid read of size 1 ==1239523== at 0x97844C: to_wide (tree.h:6257) ==1239523== by 0x97844C: irange::set_varying(tree_node*) (value-range.h:959) ==1239523== by 0x10C1A45: range_query::get_tree_range(vrange&, tree_node*, gimple*) (value-query.cc:252) ==1239523== by 0x1B52256: gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*) (gimple-range.cc:298) ==1239523== by 0x1B52778: gimple_ranger::register_inferred_ranges(gimple*) (gimple-range.cc:474) ==1239523== by 0x109FB19: rvrp_folder::fold_stmt(gimple_stmt_iterator*) (tree-vrp.cc:1079) ==1239523== by 0xFA9ED3: substitute_and_fold_dom_walker::before_dom_children(basic_block_def*) (tree-ssa-propagate.cc:848) ==1239523== by 0x1B24C2E: dom_walker::walk(basic_block_def*) (domwalk.cc:311) ==1239523== by 0xFA9312: substitute_and_fold_engine::substitute_and_fold(basic_block_def*) (tree-ssa-propagate.cc:971) ==1239523== by 0x109DB80: execute_ranger_vrp(function*, bool, bool) (tree-vrp.cc:1107) ==1239523== by 0xD3A0EA: execute_one_pass(opt_pass*) (passes.cc:2651) ==1239523== by 0xD3A9AF: execute_pass_list_1(opt_pass*) (passes.cc:2760) ==1239523== by 0xD3A9C1: execute_pass_list_1(opt_pass*) (passes.cc:2761) ==1239523== Address 0x4 is not stack'd, malloc'd or (recently) free'd ==1239523== during GIMPLE pass: evrp /tmp/foo.cxx: In constructor 'Clock::Clock()': /tmp/foo.cxx:14:31: internal compiler error: Segmentation fault 14 | Clock::Clock() { ClockImpl(); } | ^ 0xe10df3 crash_signal /usr/src/debug/sys-devel/gcc-13.1.1_p20230513/gcc-13-20230513/gcc/toplev.cc:314 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. ``` It crashes without valgrind too, just less informative.
next reply other threads:[~2023-05-15 22:37 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-15 22:37 sjames at gcc dot gnu.org [this message] 2023-05-15 22:40 ` [Bug c++/109868] " sjames at gcc dot gnu.org 2023-05-15 22:40 ` sjames at gcc dot gnu.org 2023-05-15 22:43 ` [Bug tree-optimization/109868] [13/14 regression] ICE: segmentation fault or ICE in min_value with zero sized bitfield pinskia at gcc dot gnu.org 2023-05-15 22:45 ` pinskia at gcc dot gnu.org 2023-05-15 22:52 ` pinskia at gcc dot gnu.org 2023-05-15 22:53 ` pinskia at gcc dot gnu.org 2023-05-15 22:55 ` jakub at gcc dot gnu.org 2023-05-15 23:02 ` pinskia at gcc dot gnu.org 2023-05-15 23:02 ` jakub at gcc dot gnu.org 2023-05-15 23:06 ` sjames at gcc dot gnu.org 2023-05-16 0:13 ` pinskia at gcc dot gnu.org 2023-05-16 0:15 ` pinskia at gcc dot gnu.org 2023-05-16 4:25 ` sjames at gcc dot gnu.org 2023-05-16 8:13 ` jakub at gcc dot gnu.org 2023-05-16 15:47 ` pinskia at gcc dot gnu.org 2023-05-17 6:57 ` rguenth at gcc dot gnu.org 2023-05-17 8:16 ` cvs-commit at gcc dot gnu.org 2023-05-17 19:27 ` cvs-commit at gcc dot gnu.org 2023-05-17 19:28 ` jakub at gcc dot gnu.org 2023-05-17 19:32 ` 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-109868-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).