public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/102507] New: ICE in btf_finalize when compiling with -gbtf
@ 2021-09-27 21:04 ibhagatgnu at gmail dot com
2021-09-27 21:06 ` [Bug debug/102507] " ibhagat at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ibhagatgnu at gmail dot com @ 2021-09-27 21:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102507
Bug ID: 102507
Summary: ICE in btf_finalize when compiling with -gbtf
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: ibhagatgnu at gmail dot com
Target Milestone: ---
Noticed this ICE (in gmp) when bootstrapping GCC with -gbtf as an experiment.
Program received signal SIGSEGV, Segmentation fault.
0x0000000000ce775c in simple_hashmap_traits<default_hash_traits<ctf_dvdef*>,
unsigned int>::is_empty<hash_map<ctf_dvdef*, unsigned int,
simple_hashmap_traits<default_hash_traits<ctf_dvdef*>, unsigned int>
>::hash_entry> (entry=...) at <SRC>/gcc/gcc/hash-map-traits.h:75
75 return H::is_empty (entry.m_key);
Missing separate debuginfos, use: debuginfo-install
glibc-2.17-260.0.9.el7.x86_64 libgcc-4.8.5-16.el7.x86_64
libstdc++-4.8.5-16.el7.x86_64
(gdb) bt
#0 0x0000000000ce775c in
simple_hashmap_traits<default_hash_traits<ctf_dvdef*>, unsigned
int>::is_empty<hash_map<ctf_dvdef*, unsigned int,
simple_hashmap_traits<default_hash_traits<ctf_dvdef*>, unsigned int>
>::hash_entry> (entry=...) at <SRC>/gcc/gcc/hash-map-traits.h:75
#1 0x0000000000ce7bab in hash_map<ctf_dvdef*, unsigned int,
simple_hashmap_traits<default_hash_traits<ctf_dvdef*>, unsigned int>
>::hash_entry::is_empty (e=...)
at <SRC>/gcc/gcc/hash-map.h:71
#2 0x0000000000ce8623 in hash_table<hash_map<ctf_dvdef*, unsigned int,
simple_hashmap_traits<default_hash_traits<ctf_dvdef*>, unsigned int>
>::hash_entry, false, xcallocator>::is_empty (v=...)
at <SRC>/gcc/gcc/hash-table.h:541
#3 0x0000000000ce8d30 in hash_table<hash_map<ctf_dvdef*, unsigned int,
simple_hashmap_traits<default_hash_traits<ctf_dvdef*>, unsigned int>
>::hash_entry, false, xcallocator>::~hash_table (this=0x7ffff088fe10,
__in_chrg=<optimized out>) at <SRC>/gcc/gcc/hash-table.h:681
#4 0x0000000000ce8c20 in hash_map<ctf_dvdef*, unsigned int,
simple_hashmap_traits<default_hash_traits<ctf_dvdef*>, unsigned int>
>::~hash_map (this=0x7ffff088fe10, __in_chrg=<optimized out>)
at <SRC>/gcc/gcc/hash-map.h:39
#5 0x0000000000ce8c3a in finalize<hash_map<ctf_dvdef*, unsigned int,
simple_hashmap_traits<default_hash_traits<ctf_dvdef*>, unsigned int> > >
(p=0x7ffff088fe10) at <SRC>/gcc/gcc/ggc.h:162
#6 0x0000000000c31dd2 in finalizer::call (this=0x3fd29f8) at
<SRC>/gcc/gcc/ggc-page.c:333
#7 0x0000000000c304be in ggc_handle_finalizers () at
<SRC>/gcc/gcc/ggc-page.c:1928
#8 0x0000000000c30bd7 in ggc_collect (mode=GGC_COLLECT_HEURISTIC) at
<SRC>/gcc/gcc/ggc-page.c:2228
#9 0x0000000001244668 in execute_one_pass (pass=0x3f2e730) at
<SRC>/gcc/gcc/passes.c:2639
#10 0x00000000012446dd in execute_pass_list_1 (pass=0x3f2e730) at
<SRC>/gcc/gcc/passes.c:2656
#11 0x0000000001244764 in execute_pass_list (fn=0x7ffff077f600, pass=0x3f2e6d0)
at <SRC>/gcc/gcc/passes.c:2667
#12 0x00000000012426a6 in do_per_function_toporder (callback=0x1244727
<execute_pass_list(function*, opt_pass*)>, data=0x3f2e6d0) at
<SRC>/gcc/gcc/passes.c:1773
#13 0x0000000001245384 in execute_ipa_pass_list (pass=0x3f2e670) at
<SRC>/gcc/gcc/passes.c:3003
#14 0x0000000000d1299a in ipa_passes () at <SRC>/gcc/gcc/cgraphunit.c:2154
#15 0x0000000000d12dcc in symbol_table::compile (this=0x7ffff08c6000) at
<SRC>/gcc/gcc/cgraphunit.c:2289
#16 0x0000000000d13326 in symbol_table::finalize_compilation_unit
(this=0x7ffff08c6000) at <SRC>/gcc/gcc/cgraphunit.c:2537
#17 0x00000000013a19fd in compile_file () at <SRC>/gcc/gcc/toplev.c:483
#18 0x00000000013a4b11 in do_compile () at <SRC>/gcc/gcc/toplev.c:2233
#19 0x00000000013a4df7 in toplev::main (this=0x7fffffffdcf0, argc=24,
argv=0x7fffffffddf8) at <SRC>/gcc/gcc/toplev.c:2372
#20 0x00000000029109f2 in main (argc=24, argv=0x7fffffffddf8) at
<SRC>/gcc/gcc/main.c:39
Looks like the garbage collector, when cleaning up the btf_var_ids hash_map, is
working on invalid memory and bails out.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/102507] ICE in btf_finalize when compiling with -gbtf
2021-09-27 21:04 [Bug debug/102507] New: ICE in btf_finalize when compiling with -gbtf ibhagatgnu at gmail dot com
@ 2021-09-27 21:06 ` ibhagat at gcc dot gnu.org
2021-09-29 20:29 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ibhagat at gcc dot gnu.org @ 2021-09-27 21:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102507
Indu Bhagat <ibhagat at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-09-27
Assignee|unassigned at gcc dot gnu.org |ibhagatgnu at gmail dot com
Ever confirmed|0 |1
CC| |ibhagat at gcc dot gnu.org
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/102507] ICE in btf_finalize when compiling with -gbtf
2021-09-27 21:04 [Bug debug/102507] New: ICE in btf_finalize when compiling with -gbtf ibhagatgnu at gmail dot com
2021-09-27 21:06 ` [Bug debug/102507] " ibhagat at gcc dot gnu.org
@ 2021-09-29 20:29 ` cvs-commit at gcc dot gnu.org
2021-09-30 9:53 ` marxin at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-29 20:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102507
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Indu Bhagat <ibhagat@gcc.gnu.org>:
https://gcc.gnu.org/g:d6a87d96d7473cbd2404d5dcc7eef36a7f53b2b2
commit r12-3972-gd6a87d96d7473cbd2404d5dcc7eef36a7f53b2b2
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date: Wed Sep 29 13:25:39 2021 -0700
debug/102507: ICE in btf_finalize when compiling with -gbtf
Fix the free up of btf_var_ids hash_map in btf_finalize ().
gcc/ChangeLog:
PR debug/102507
* btfout.c (GTY): Add GTY (()) albeit for cosmetic only purpose.
(btf_finalize): Empty the hash_map btf_var_ids.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/102507] ICE in btf_finalize when compiling with -gbtf
2021-09-27 21:04 [Bug debug/102507] New: ICE in btf_finalize when compiling with -gbtf ibhagatgnu at gmail dot com
2021-09-27 21:06 ` [Bug debug/102507] " ibhagat at gcc dot gnu.org
2021-09-29 20:29 ` cvs-commit at gcc dot gnu.org
@ 2021-09-30 9:53 ` marxin at gcc dot gnu.org
2021-10-01 14:27 ` ibhagat at gcc dot gnu.org
2021-10-05 15:52 ` ibhagat at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-30 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102507
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Is it fixed now?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/102507] ICE in btf_finalize when compiling with -gbtf
2021-09-27 21:04 [Bug debug/102507] New: ICE in btf_finalize when compiling with -gbtf ibhagatgnu at gmail dot com
` (2 preceding siblings ...)
2021-09-30 9:53 ` marxin at gcc dot gnu.org
@ 2021-10-01 14:27 ` ibhagat at gcc dot gnu.org
2021-10-05 15:52 ` ibhagat at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ibhagat at gcc dot gnu.org @ 2021-10-01 14:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102507
Indu Bhagat <ibhagat at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ibhagat at gcc dot gnu.org
--- Comment #3 from Indu Bhagat <ibhagat at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #2)
> Is it fixed now?
I would like to compile another application before I close this one (should be
doable coming monday, the remote machine I need for this has been taken down
for maintenance :/).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/102507] ICE in btf_finalize when compiling with -gbtf
2021-09-27 21:04 [Bug debug/102507] New: ICE in btf_finalize when compiling with -gbtf ibhagatgnu at gmail dot com
` (3 preceding siblings ...)
2021-10-01 14:27 ` ibhagat at gcc dot gnu.org
@ 2021-10-05 15:52 ` ibhagat at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ibhagat at gcc dot gnu.org @ 2021-10-05 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102507
Indu Bhagat <ibhagat at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Indu Bhagat <ibhagat at gcc dot gnu.org> ---
Tested and verified it works. Closing the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-05 15:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 21:04 [Bug debug/102507] New: ICE in btf_finalize when compiling with -gbtf ibhagatgnu at gmail dot com
2021-09-27 21:06 ` [Bug debug/102507] " ibhagat at gcc dot gnu.org
2021-09-29 20:29 ` cvs-commit at gcc dot gnu.org
2021-09-30 9:53 ` marxin at gcc dot gnu.org
2021-10-01 14:27 ` ibhagat at gcc dot gnu.org
2021-10-05 15:52 ` ibhagat 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).