From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 598F33858D1E; Tue, 8 Feb 2022 21:12:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 598F33858D1E From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104453] New: [9/10/11/12 Regression] ICE: SIGSEGV in handled_component_p with truncated input Date: Tue, 08 Feb 2022 21:12:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2022 21:12:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104453 Bug ID: 104453 Summary: [9/10/11/12 Regression] ICE: SIGSEGV in handled_component_p with truncated input Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 52382 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52382&action=3Dedit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -mavx512f testcase.c -wrapper valgrind,-q testcase.c: In function 'foo': testcase.c:7:33: error: expected ')' at end of input 7 | __builtin_ia32_psrawi256 (g, 0 | ~ ^ | ) testcase.c:7:3: error: expected declaration or statement at end of input 7 | __builtin_ia32_psrawi256 (g, 0 | ^~~~~~~~~~~~~~~~~~~~~~~~ =3D=3D13315=3D=3D Invalid read of size 2 =3D=3D13315=3D=3D at 0x1062CC4: handled_component_p (tree.h:5069) =3D=3D13315=3D=3D by 0x1062CC4: get_base_loadstore(tree_node*) (gimple-w= alk.cc:732) =3D=3D13315=3D=3D by 0x1063B70: walk_stmt_load_store_addr_ops(gimple*, v= oid*, bool (*)(gimple*, tree_node*, tree_node*, void*), bool (*)(gimple*, tree_node*, tree_node*, void*), bool (*)(gimple*, tree_node*, tree_node*, void*)) (gimple-walk.cc:765) =3D=3D13315=3D=3D by 0xEA8CBA: record_stmt_references (cgraphbuild.cc:26= 3) =3D=3D13315=3D=3D by 0xEA8CBA: (anonymous namespace)::pass_build_cgraph_edges::execute(function*) (cgraphbuild.cc:330) =3D=3D13315=3D=3D by 0x127E0DA: execute_one_pass(opt_pass*) (passes.cc:2= 637) =3D=3D13315=3D=3D by 0x127E99F: execute_pass_list_1(opt_pass*) (passes.c= c:2737) =3D=3D13315=3D=3D by 0x127E9D8: execute_pass_list(function*, opt_pass*) (passes.cc:2748) =3D=3D13315=3D=3D by 0xEAB0FB: cgraph_node::analyze() (cgraphunit.cc:685) =3D=3D13315=3D=3D by 0xEADF97: analyze_functions(bool) (cgraphunit.cc:12= 40) =3D=3D13315=3D=3D by 0xEAEC2D: symbol_table::finalize_compilation_unit() (cgraphunit.cc:2500) =3D=3D13315=3D=3D by 0x1386F3F: compile_file() (toplev.cc:479) =3D=3D13315=3D=3D by 0xCF54E8: do_compile (toplev.cc:2158) =3D=3D13315=3D=3D by 0xCF54E8: toplev::main(int, char**) (toplev.cc:2310) =3D=3D13315=3D=3D by 0xCF6C0A: main (main.cc:39) =3D=3D13315=3D=3D Address 0x0 is not stack'd, malloc'd or (recently) free'd =3D=3D13315=3D=3D=20 during GIMPLE pass: *build_cgraph_edges testcase.c:5:1: internal compiler error: Segmentation fault 5 | foo (void) | ^~~ 0x1386c7f crash_signal /repo/gcc-trunk/gcc/toplev.cc:322 0x1062cc4 handled_component_p /repo/gcc-trunk/gcc/tree.h:5069 0x1062cc4 get_base_loadstore /repo/gcc-trunk/gcc/gimple-walk.cc:732 0x1063b70 walk_stmt_load_store_addr_ops(gimple*, void*, bool (*)(gimple*, tree_node*, tree_node*, void*), bool (*)(gimple*, tree_node*, tree_node*, void*), bool (*)(gimple*, tree_node*, tree_node*, void*)) /repo/gcc-trunk/gcc/gimple-walk.cc:765 0xea8cba cgraph_node::record_stmt_references(gimple*) /repo/gcc-trunk/gcc/cgraphbuild.cc:263 0xea8cba execute /repo/gcc-trunk/gcc/cgraphbuild.cc:330 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=3D/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g= cc COLLECT_LTO_WRAPPER=3D/repo/gcc-trunk/binary-trunk-r12-7089-20220208123931-= g0103c2e4082-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-l= inux-gnu/12.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=3Dc,c++ --enable-valgrind-annotations --disable-nls --enable-checking=3Dyes,rtl,df,= extra --with-cloog --with-ppl --with-isl --build=3Dx86_64-pc-linux-gnu --host=3Dx86_64-pc-linux-gnu --target=3Dx86_64-pc-linux-gnu --with-ld=3D/usr/bin/x86_64-pc-linux-gnu-ld --with-as=3D/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=3D/repo/gcc-trunk//binary-trunk-r12-7089-20220208123931-g0103c2e40= 82-checking-yes-rtl-df-extra-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.1 20220208 (experimental) (GCC)=