[Bug gcov-profile/66805] Crash in gcov_exit when combining --coverage, C++, #pragma pack
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 8 11:29:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66805
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-07-08
Component|c++ |gcov-profile
Ever confirmed|0 |1
Known to fail| |4.3.4, 4.8.5, 5.2.0
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with GCC 5 and 4.8 and 4.3.
Program received signal SIGSEGV, Segmentation fault.
compute_summary (max_length=<synthetic pointer>, this_prg=0x7fffffff9530,
list=0x7ffff7ddb180)
at /space/rguenther/src/svn/gcc-5-branch/libgcc/libgcov-driver.c:307
307 gfi_ptr = gi_ptr->functions[f_ix];
Missing separate debuginfos, use: zypper install
libgcc_s1-gcc5-debuginfo-5.1.1+r225500-40.1.x86_64
libstdc++6-gcc5-debuginfo-5.1.1+r225500-40.1.x86_64
(gdb) bt
#0 compute_summary (max_length=<synthetic pointer>, this_prg=0x7fffffff9530,
list=0x7ffff7ddb180)
at /space/rguenther/src/svn/gcc-5-branch/libgcc/libgcov-driver.c:307
#1 gcov_do_dump (list=0x7ffff7ddb180, run_counted=0)
at /space/rguenther/src/svn/gcc-5-branch/libgcc/libgcov-driver.c:837
#2 0x00007ffff7bda0b2 in __gcov_dump_one (root=0x7ffff7ddc280 <__gcov_root>)
at /space/rguenther/src/svn/gcc-5-branch/libgcc/libgcov-driver.c:858
#3 gcov_exit ()
at /space/rguenther/src/svn/gcc-5-branch/libgcc/libgcov-driver.c:874
#4 0x00007ffff6fc53df in __cxa_finalize () from /lib64/libc.so.6
#5 0x00007ffff7bd8113 in __do_global_dtors_aux () from ./pack.so
#6 0x00007fffffffddf0 in ?? ()
#7 0x00007ffff7debe6a in _dl_fini () from /lib64/ld-linux-x86-64.so.2
(gdb) p gi_ptr->n_functions
$2 = 32767
somehow this can't be true.
I suppose somehow #pragma pack () affects building of the __gcov_info struct.
Indeed:
(gdb) p debug_tree (type)
<record_type 0x7ffff6a4c7e0 BLK
size <integer_cst 0x7ffff6a46df8 type <integer_type 0x7ffff68d0150
bitsizetype> constant 928>
unit size <integer_cst 0x7ffff6a46e88 type <integer_type 0x7ffff68d00a8
sizetype> constant 116>
align 8 symtab 0 alias set -1 canonical type 0x7ffff6a4c7e0
fields <field_decl 0x7ffff6a3ab48 D.2347
type <integer_type 0x7ffff68d0738 unsigned int public unsigned SI
size <integer_cst 0x7ffff68ee0a8 constant 32>
unit size <integer_cst 0x7ffff68ee0c0 constant 4>
align 32 symtab 0 alias set -1 canonical type 0x7ffff68d0738
precision 32 min <integer_cst 0x7ffff68ee0d8 0> max <integer_cst 0x7ffff68ee090
4294967295>
pointer_to_this <pointer_type 0x7ffff68f7c78>>
unsigned SI file <built-in> line 0 col 0 size <integer_cst
0x7ffff68ee0a8 32> unit size <integer_cst 0x7ffff68ee0c0 4>
align 8 offset_align 128
...
More information about the Gcc-bugs
mailing list