public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/114599] New: ICE: SIGSEGV in bitmap_set_bit(bitmap_head*, int) (bitmap.cc:975) with -O2 -fcondition-coverage
@ 2024-04-05  4:19 zsojka at seznam dot cz
  2024-04-05  8:02 ` [Bug gcov-profile/114599] [14 Regression] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2024-04-05  4:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114599

            Bug ID: 114599
           Summary: ICE: SIGSEGV in bitmap_set_bit(bitmap_head*, int)
                    (bitmap.cc:975) with -O2 -fcondition-coverage
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          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 57884
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57884&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O2 -fcondition-coverage testcase.c -wrapper
valgrind,-q
==26792== Invalid write of size 4
==26792==    at 0xF3D16E: bitmap_set_bit(bitmap_head*, int) (bitmap.cc:975)
==26792==    by 0xFB61F3: symtab_node::check_ifunc_callee_symtab_nodes()
(symtab.cc:1449)
==26792==    by 0xFCF454: symbol_table::compile() [clone .part.0]
(cgraphunit.cc:2320)
==26792==    by 0xFD2797: compile (cgraphunit.cc:2315)
==26792==    by 0xFD2797: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2589)
==26792==    by 0x1513631: compile_file() (toplev.cc:476)
==26792==    by 0xDE845B: do_compile (toplev.cc:2154)
==26792==    by 0xDE845B: toplev::main(int, char**) (toplev.cc:2310)
==26792==    by 0xDE9C3A: main (main.cc:39)
==26792==  Address 0x527a330 is 32 bytes inside a block of size 65,536 alloc'd
==26792==    at 0x483E804: malloc (vg_replace_malloc.c:442)
==26792==    by 0x2AA5B4B: xmalloc (xmalloc.c:149)
==26792==    by 0x2AA2384: call_chunkfun (obstack.c:94)
==26792==    by 0x2AA2384: _obstack_begin_worker (obstack.c:141)
==26792==    by 0xFD0EDE: analyze_functions(bool) (cgraphunit.cc:1172)
==26792==    by 0xFD272D: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2560)
==26792==    by 0x1513631: compile_file() (toplev.cc:476)
==26792==    by 0xDE845B: do_compile (toplev.cc:2154)
==26792==    by 0xDE845B: toplev::main(int, char**) (toplev.cc:2310)
==26792==    by 0xDE9C3A: main (main.cc:39)
...
during IPA pass: profile
testcase.c: In function 'do_all_fn_LHASH_DOALL_ARG_arg2':
testcase.c:16:1: internal compiler error: Segmentation fault
   16 | }
      | ^
0x151314f crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:319
0x15fba9a hash_table_mod1(unsigned int, unsigned int)
        /repo/gcc-trunk/gcc/hash-table.h:344
0x15fba9a hash_table<hash_map<gcond*, unsigned int,
simple_hashmap_traits<default_hash_traits<gcond*>, unsigned int> >::hash_entry,
false, xcallocator>::find_with_hash(gcond* const&, unsigned int)
        /repo/gcc-trunk/gcc/hash-table.h:985
0x15f9c9b hash_map<gcond*, unsigned int,
simple_hashmap_traits<default_hash_traits<gcond*>, unsigned int> >::get(gcond*
const&)
        /repo/gcc-trunk/gcc/hash-map.h:191
0x15f9c9b condition_uid
        /repo/gcc-trunk/gcc/tree-profile.cc:370
0x15f9c9b find_conditions(function*)
        /repo/gcc-trunk/gcc/tree-profile.cc:877
0x140dc23 branch_prob(bool)
        /repo/gcc-trunk/gcc/profile.cc:1549
0x15f92f4 tree_profiling
        /repo/gcc-trunk/gcc/tree-profile.cc:1917
0x15f92f4 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 <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-9799-20240405035546-g4c8b3600c48-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=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9799-20240405035546-g4c8b3600c48-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240405 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-09  7:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05  4:19 [Bug ipa/114599] New: ICE: SIGSEGV in bitmap_set_bit(bitmap_head*, int) (bitmap.cc:975) with -O2 -fcondition-coverage zsojka at seznam dot cz
2024-04-05  8:02 ` [Bug gcov-profile/114599] [14 Regression] " rguenth at gcc dot gnu.org
2024-04-05  8:04 ` rguenth at gcc dot gnu.org
2024-04-05  9:13 ` cvs-commit at gcc dot gnu.org
2024-04-05  9:13 ` rguenth at gcc dot gnu.org
2024-04-05 13:42 ` hjl.tools at gmail dot com
2024-04-05 13:43 ` hjl.tools at gmail dot com
2024-04-06 11:11 ` cvs-commit at gcc dot gnu.org
2024-04-08  6:55 ` rguenth at gcc dot gnu.org
2024-04-09  7:58 ` cvs-commit 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).