public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48954] New: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions
@ 2011-05-10 18:04 zsojka at seznam dot cz
  2011-05-11  4:05 ` [Bug lto/48954] " hjl.tools at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-05-10 18:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48954

           Summary: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits
                    (bitmap.c:719) with -O2 -flto -fno-early-inlining
                    -fkeep-inline-functions
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 24220
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24220
reduced testcase

Compiler output (run under valgrind):
$ g++ -O2 -flto -fno-early-inlining -fkeep-inline-functions testcase.C
==3584== 
==3584== Invalid read of size 8
==3584==    at 0x507DE6: bitmap_count_bits (bitmap.c:719)
==3584==    by 0x7491C2: output_cgraph (lto-cgraph.c:1591)
==3584==    by 0x759C91: lto_output (lto-streamer-out.c:2222)
==3584==    by 0x7940E2: ipa_write_optimization_summaries_1 (passes.c:1760)
==3584==    by 0x794C2F: ipa_write_optimization_summaries (passes.c:1806)
==3584==    by 0x4F59DA: lto_main (lto.c:1996)
==3584==    by 0x880F69: toplev_main (toplev.c:570)
==3584==    by 0x644AB6C: (below main) (in /lib64/libc-2.11.3.so)
==3584==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==3584== 
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r173586 - crash
4.6 r173059 - OK (yes,rtl,df checking)


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

* [Bug lto/48954] [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions
  2011-05-10 18:04 [Bug middle-end/48954] New: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions zsojka at seznam dot cz
@ 2011-05-11  4:05 ` hjl.tools at gmail dot com
  2011-06-04 13:12 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-11  4:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48954

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.05.11 03:11:56
                 CC|                            |hubicka at gcc dot gnu.org
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-11 03:11:56 UTC ---
It is caused by revision 172914:

http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg01110.html


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

* [Bug lto/48954] [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions
  2011-05-10 18:04 [Bug middle-end/48954] New: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions zsojka at seznam dot cz
  2011-05-11  4:05 ` [Bug lto/48954] " hjl.tools at gmail dot com
@ 2011-06-04 13:12 ` hubicka at gcc dot gnu.org
  2011-06-04 13:16 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-06-04 13:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48954

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-06-04 13:11:40 UTC ---
Hmm,
I don't really get the uninitialized access, instead I now get an ice:
lto1: internal compiler error: vector VEC(cgraph_node_ptr,base) index domain
error, in lto_cgraph_encoder_deref at lto-cgraph.c:143

It comes from:
#1  0x00000000009afb79 in vec_assert_fail (op=0xf1f0a8 "index",
struct_name=0xd46859 "VEC(cgraph_node_ptr,base)", file=Unhandled dwarf
expression opcode 0xf3
) at ../../gcc/vec.c:516
#2  0x00000000006d1f90 in VEC_cgraph_node_ptr_base_index (file_=Unhandled dwarf
expression opcode 0xf3
) at ../../gcc/cgraph.h:253
#3  0x00000000006ceda0 in lto_cgraph_encoder_deref (encoder=Unhandled dwarf
expression opcode 0xf3
) at ../../gcc/lto-cgraph.c:141
#4  0x0000000001420770 in ?? ()
#5  0x000000000069557a in ipa_prop_read_jump_functions () at
../../gcc/ipa-prop.c:2928
#6  0x000000000071f48b in ipa_read_summaries_1 (pass=0x1242ec0) at
../../gcc/passes.c:2144

So jump functions stream is corrupted somehow.


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

* [Bug lto/48954] [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions
  2011-05-10 18:04 [Bug middle-end/48954] New: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions zsojka at seznam dot cz
  2011-05-11  4:05 ` [Bug lto/48954] " hjl.tools at gmail dot com
  2011-06-04 13:12 ` hubicka at gcc dot gnu.org
@ 2011-06-04 13:16 ` hubicka at gcc dot gnu.org
  2011-06-04 13:37 ` hubicka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-06-04 13:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48954

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-06-04 13:15:35 UTC ---
Hmm, updating the tree however gets me to count bits error. The bug above is
alsomost probably inconsistency in cgraph encoder, so it seems like a random
memory corruption shooting into the encoder... ugly...


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

* [Bug lto/48954] [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions
  2011-05-10 18:04 [Bug middle-end/48954] New: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-06-04 13:16 ` hubicka at gcc dot gnu.org
@ 2011-06-04 13:37 ` hubicka at gcc dot gnu.org
  2011-06-04 16:21 ` hubicka at gcc dot gnu.org
  2011-08-02 14:11 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-06-04 13:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48954

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-06-04 13:37:03 UTC ---
Created attachment 24430
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24430
patch I am testing

Hi,
this patch fixes ICE in counting bits of bitmap that is NULL.  I am not sure
how this chould worked before and if it is last problem exhibited by the
testcase. But it makes the problem go away for me.

Will commit it after testing.


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

* [Bug lto/48954] [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions
  2011-05-10 18:04 [Bug middle-end/48954] New: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-06-04 13:37 ` hubicka at gcc dot gnu.org
@ 2011-06-04 16:21 ` hubicka at gcc dot gnu.org
  2011-08-02 14:11 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-06-04 16:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48954

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-06-04 16:20:42 UTC ---
Author: hubicka
Date: Sat Jun  4 16:20:36 2011
New Revision: 174644

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174644
Log:

    PR lto/48954
    * lto-cgraph.c (output_node_opt_summary): Handle NULL skip args bitmaps.
    * g++.dg/torture/pr48954.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr48954.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lto-cgraph.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug lto/48954] [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions
  2011-05-10 18:04 [Bug middle-end/48954] New: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-06-04 16:21 ` hubicka at gcc dot gnu.org
@ 2011-08-02 14:11 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-02 14:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48954

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-02 14:09:40 UTC ---
Fixed.


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

end of thread, other threads:[~2011-08-02 14:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-10 18:04 [Bug middle-end/48954] New: [4.7 Regression] ICE: SIGSEGV in bitmap_count_bits (bitmap.c:719) with -O2 -flto -fno-early-inlining -fkeep-inline-functions zsojka at seznam dot cz
2011-05-11  4:05 ` [Bug lto/48954] " hjl.tools at gmail dot com
2011-06-04 13:12 ` hubicka at gcc dot gnu.org
2011-06-04 13:16 ` hubicka at gcc dot gnu.org
2011-06-04 13:37 ` hubicka at gcc dot gnu.org
2011-06-04 16:21 ` hubicka at gcc dot gnu.org
2011-08-02 14:11 ` rguenth 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).