From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 20DF33858C32; Fri, 5 Apr 2024 11:53:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20DF33858C32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712317990; bh=O00Hz3tM/l1rsX629aypnBRsCF0c0SH+zltenLbEhzY=; h=From:To:Subject:Date:From; b=vrbo8zEiM6yMqgVmvrwz67RNI5crg74/GK5hORbM6e58m30/w8acg0OJwNxPBv5+i 2sElU/kWTW0InLydxHBSIhtcTN1H5UIT4vXPW1q+cg6e6+id88axhJtLQF/V51UDqk xy7QS1LKvTdgbH+ngyKqI+yGbKRffIcCwlxt7AVg= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/114601] New: ICE: SIGSEGV in hash_table_mod1 (hash-table.h:344) with -fcondition-coverage -finstrument-functions-once Date: Fri, 05 Apr 2024 11:53:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-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 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114601 Bug ID: 114601 Summary: ICE: SIGSEGV in hash_table_mod1 (hash-table.h:344) with -fcondition-coverage -finstrument-functions-once Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: gcov-profile 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 This happens also after the PR114599 fix. Compiler output: $ cat testcase.c=20 void foo() {} $ x86_64-pc-linux-gnu-gcc -fcondition-coverage -finstrument-functions-once testcase.c -wrapper valgrind,-q =3D=3D25248=3D=3D Invalid read of size 4 =3D=3D25248=3D=3D at 0x15FBA4A: hash_table_mod1 (hash-table.h:344) =3D=3D25248=3D=3D by 0x15FBA4A: hash_table, unsigned int> >::hash_en= try, false, xcallocator>::find_with_hash(gcond* const&, unsigned int) (hash-table.h:985) =3D=3D25248=3D=3D by 0x15F9C4B: get (hash-map.h:191) =3D=3D25248=3D=3D by 0x15F9C4B: condition_uid (tree-profile.cc:370) =3D=3D25248=3D=3D by 0x15F9C4B: find_conditions(function*) (tree-profile= .cc:877) =3D=3D25248=3D=3D by 0x140DBD3: branch_prob(bool) (profile.cc:1549) =3D=3D25248=3D=3D by 0x15F92A4: tree_profiling (tree-profile.cc:1917) =3D=3D25248=3D=3D by 0x15F92A4: (anonymous namespace)::pass_ipa_tree_profile::execute(function*) (tree-profile.cc:2046) =3D=3D25248=3D=3D by 0x13D0F7A: execute_one_pass(opt_pass*) (passes.cc:2= 647) =3D=3D25248=3D=3D by 0x13D2346: execute_ipa_pass_list(opt_pass*) (passes= .cc:3096) =3D=3D25248=3D=3D by 0xFCFEC7: ipa_passes (cgraphunit.cc:2214) =3D=3D25248=3D=3D by 0xFCFEC7: symbol_table::compile() [clone .part.0] (cgraphunit.cc:2337) =3D=3D25248=3D=3D by 0xFD2747: compile (cgraphunit.cc:2315) =3D=3D25248=3D=3D by 0xFD2747: symbol_table::finalize_compilation_unit() (cgraphunit.cc:2589) =3D=3D25248=3D=3D by 0x15135E1: compile_file() (toplev.cc:476) =3D=3D25248=3D=3D by 0xDE841B: do_compile (toplev.cc:2154) =3D=3D25248=3D=3D by 0xDE841B: toplev::main(int, char**) (toplev.cc:2310) =3D=3D25248=3D=3D by 0xDE9BFA: main (main.cc:39) =3D=3D25248=3D=3D Address 0x30 is not stack'd, malloc'd or (recently) free= 'd =3D=3D25248=3D=3D=20 during IPA pass: profile testcase.c: In function 'foo': testcase.c:1:1: internal compiler error: Segmentation fault 1 | void foo() {} | ^~~~ 0x15130ff crash_signal /repo/gcc-trunk/gcc/toplev.cc:319 0x15fba4a hash_table_mod1(unsigned int, unsigned int) /repo/gcc-trunk/gcc/hash-table.h:344 0x15fba4a hash_table, unsigned int> >::hash_en= try, false, xcallocator>::find_with_hash(gcond* const&, unsigned int) /repo/gcc-trunk/gcc/hash-table.h:985 0x15f9c4b hash_map, unsigned int> >::get(gco= nd* const&) /repo/gcc-trunk/gcc/hash-map.h:191 0x15f9c4b condition_uid /repo/gcc-trunk/gcc/tree-profile.cc:370 0x15f9c4b find_conditions(function*) /repo/gcc-trunk/gcc/tree-profile.cc:877 0x140dbd3 branch_prob(bool) /repo/gcc-trunk/gcc/profile.cc:1549 0x15f92a4 tree_profiling /repo/gcc-trunk/gcc/tree-profile.cc:1917 0x15f92a4 execute /repo/gcc-trunk/gcc/tree-profile.cc:2046 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-r14-9803-20240405111321-= g9ab8fdfeef5-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc= /x86_64-pc-linux-gnu/14.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 --disable-bootstrap --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 --enable-libsanitizer --disable-libstdcxx-pch --prefix=3D/repo/gcc-trunk//binary-trunk-r14-9803-20240405111321-g9ab8fdfee= f5-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240405 (experimental) (GCC)=