public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/113316] New: during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument @ 2024-01-10 21:19 zsojka at seznam dot cz 2024-01-11 13:05 ` [Bug tree-optimization/113316] " jakub at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: zsojka at seznam dot cz @ 2024-01-10 21:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113316 Bug ID: 113316 Summary: during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz CC: jakub at gcc dot gnu.org Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 57030 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57030&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O testcase.c -wrapper valgrind,-q ==9456== Invalid read of size 8 ==9456== at 0x2661471: var_to_partition (tree-ssa-live.h:163) ==9456== by 0x2661471: (anonymous namespace)::bitint_large_huge::lower_call(tree_node*, gimple*) (gimple-lower-bitint.cc:5120) ==9456== by 0x266BF59: gimple_lower_bitint() (gimple-lower-bitint.cc:6514) ==9456== by 0x13CA4BA: execute_one_pass(opt_pass*) (passes.cc:2646) ==9456== by 0x13CADAF: execute_pass_list_1(opt_pass*) (passes.cc:2755) ==9456== by 0x13CADC1: execute_pass_list_1(opt_pass*) (passes.cc:2756) ==9456== by 0x13CADE8: execute_pass_list(function*, opt_pass*) (passes.cc:2766) ==9456== by 0xFCB105: expand (cgraphunit.cc:1842) ==9456== by 0xFCB105: cgraph_node::expand() (cgraphunit.cc:1795) ==9456== by 0xFCC44A: expand_all_functions (cgraphunit.cc:2025) ==9456== by 0xFCC44A: symbol_table::compile() [clone .part.0] (cgraphunit.cc:2399) ==9456== by 0xFCEFC7: compile (cgraphunit.cc:2312) ==9456== by 0xFCEFC7: symbol_table::finalize_compilation_unit() (cgraphunit.cc:2584) ==9456== by 0x150C3E1: compile_file() (toplev.cc:473) ==9456== by 0xDE691B: do_compile (toplev.cc:2151) ==9456== by 0xDE691B: toplev::main(int, char**) (toplev.cc:2307) ==9456== by 0xDE80FA: main (main.cc:39) ==9456== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==9456== during GIMPLE pass: bitintlower testcase.c: In function 'foo': testcase.c:4:1: internal compiler error: Segmentation fault 4 | foo (void) | ^~~ 0x150beff crash_signal /repo/gcc-trunk/gcc/toplev.cc:316 0x2661471 var_to_partition(_var_map*, tree_node*) /repo/gcc-trunk/gcc/tree-ssa-live.h:163 0x2661471 lower_call /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:5120 0x266bf59 gimple_lower_bitint /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:6514 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/113316] during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument 2024-01-10 21:19 [Bug tree-optimization/113316] New: during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument zsojka at seznam dot cz @ 2024-01-11 13:05 ` jakub at gcc dot gnu.org 2024-01-12 10:19 ` cvs-commit at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu.org @ 2024-01-11 13:05 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113316 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Last reconfirmed| |2024-01-11 Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 57042 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57042&action=edit gcc14-pr113316.patch Untested fix. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/113316] during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument 2024-01-10 21:19 [Bug tree-optimization/113316] New: during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument zsojka at seznam dot cz 2024-01-11 13:05 ` [Bug tree-optimization/113316] " jakub at gcc dot gnu.org @ 2024-01-12 10:19 ` cvs-commit at gcc dot gnu.org 2024-01-12 10:27 ` jakub at gcc dot gnu.org 2024-01-20 17:08 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2024-01-12 10:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113316 --- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:c1680bd2df187e06089b06ffe211c4abe4c440b0 commit r14-7179-gc1680bd2df187e06089b06ffe211c4abe4c440b0 Author: Jakub Jelinek <jakub@redhat.com> Date: Fri Jan 12 11:19:08 2024 +0100 lower-bitint: Fix up handling of uninitialized large/huge _BitInt call arguments [PR113316] The code to assign large/huge _BitInt SSA_NAMEs to partitions intentionally ignores uninitialized SSA_NAMEs: /* Also ignore uninitialized uses. */ if (SSA_NAME_IS_DEFAULT_DEF (s) && (!SSA_NAME_VAR (s) || VAR_P (SSA_NAME_VAR (s)))) continue; because there is no need to store them into memory, all we need is when trying to extract some limb from them use uninitialized SSA_NAME for the limb. The following testcase shows this is a problem for call arguments though, for those we need to create replacement SSA_NAMEs which are loaded from the underlying variable. For uninitialized SSA_NAMEs because we didn't create underlying variable for them var_to_partition doesn't work, the following patch handles it by just creating an uninitialized replacement SSA_NAME. 2024-01-12 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/113316 * gimple-lower-bitint.cc (bitint_large_huge::lower_call): Handle uninitialized large/huge _BitInt arguments to calls. * gcc.dg/bitint-67.c: New test. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/113316] during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument 2024-01-10 21:19 [Bug tree-optimization/113316] New: during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument zsojka at seznam dot cz 2024-01-11 13:05 ` [Bug tree-optimization/113316] " jakub at gcc dot gnu.org 2024-01-12 10:19 ` cvs-commit at gcc dot gnu.org @ 2024-01-12 10:27 ` jakub at gcc dot gnu.org 2024-01-20 17:08 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu.org @ 2024-01-12 10:27 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113316 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Fixed. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/113316] during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument 2024-01-10 21:19 [Bug tree-optimization/113316] New: during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument zsojka at seznam dot cz ` (2 preceding siblings ...) 2024-01-12 10:27 ` jakub at gcc dot gnu.org @ 2024-01-20 17:08 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2024-01-20 17:08 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113316 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |14.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-20 17:08 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-01-10 21:19 [Bug tree-optimization/113316] New: during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) at -O with uninitialized _BitInt() function argument zsojka at seznam dot cz 2024-01-11 13:05 ` [Bug tree-optimization/113316] " jakub at gcc dot gnu.org 2024-01-12 10:19 ` cvs-commit at gcc dot gnu.org 2024-01-12 10:27 ` jakub at gcc dot gnu.org 2024-01-20 17:08 ` pinskia at gcc dot gnu.org
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).