public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40388]  New: another null pointer in remove_unreachable_regions
@ 2009-06-09 13:04 dcb314 at hotmail dot com
  2009-06-09 14:27 ` [Bug middle-end/40388] [4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dcb314 at hotmail dot com @ 2009-06-09 13:04 UTC (permalink / raw)
  To: gcc-bugs

I just tried to compile the Suse Factory package blocxx-2.1.0.342-124.7
with the GNU g++ version 4.5 snapshot 20090604.

The compiler said

SecureRand.cpp: In function 'void<unnamed>::rand_init_impl()':
SecureRand.cpp:667:7: 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.

Preprocessed source code attached. Flag -O2 required.

Here is valgrind helping out with a stack backtrace

==8611== Invalid read of size 8
==8611==    at 0x6EE6FF: remove_unreachable_regions (bitmap.h:225)
==8611==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

This bug seems to be different to # 40163.


-- 
           Summary: another null pointer in remove_unreachable_regions
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
@ 2009-06-09 14:27 ` rguenth at gcc dot gnu dot org
  2009-06-10  8:28 ` dcb314 at hotmail dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-09 14:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-06-09 14:27 -------
Can you attach preprocessed source?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org
          Component|c++                         |middle-end
           Keywords|                            |ice-on-valid-code
            Summary|another null pointer in     |[4.5 Regression] another
                   |remove_unreachable_regions  |null pointer in
                   |                            |remove_unreachable_regions
   Target Milestone|---                         |4.5.0


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
  2009-06-09 14:27 ` [Bug middle-end/40388] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2009-06-10  8:28 ` dcb314 at hotmail dot com
  2009-06-10 12:01 ` hjl dot tools at gmail dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dcb314 at hotmail dot com @ 2009-06-10  8:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dcb314 at hotmail dot com  2009-06-10 08:28 -------
Created an attachment (id=17973)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17973&action=view)
C++ source code


-- 


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
  2009-06-09 14:27 ` [Bug middle-end/40388] [4.5 Regression] " rguenth at gcc dot gnu dot org
  2009-06-10  8:28 ` dcb314 at hotmail dot com
@ 2009-06-10 12:01 ` hjl dot tools at gmail dot com
  2009-06-10 14:43 ` reichelt at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-10 12:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2009-06-10 12:00 -------
It is caused by revision 146776:

http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01418.html


-- 


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2009-06-10 12:01 ` hjl dot tools at gmail dot com
@ 2009-06-10 14:43 ` reichelt at gcc dot gnu dot org
  2009-06-10 15:51 ` reichelt at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-06-10 14:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from reichelt at gcc dot gnu dot org  2009-06-10 14:43 -------
Confirmed. Reduced testcase (already crashes with "-O"):

======================================
struct A
{
  ~A();
};

struct B
{
  A* p;

  ~B()
  {
    if (p)
      delete p;
    delete p;
  }
};

struct C
{
  B* q;

  ~C()
  {
    try
    {
      delete q;
    }
    catch (...)
    {
    }
  }
};

void foo()
{
  C c1, c2;
}
======================================


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-06-10 14:43:14
               date|                            |


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2009-06-10 14:43 ` reichelt at gcc dot gnu dot org
@ 2009-06-10 15:51 ` reichelt at gcc dot gnu dot org
  2009-07-09 15:32 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-06-10 15:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from reichelt at gcc dot gnu dot org  2009-06-10 15:50 -------
Even shorter testcase:

==================
void foo();

struct A
{
  ~A()
  {
    try
    {
      foo();
      foo();
    }
    catch (...)
    {
    }
  }
};

void bar()
{
  A a1, a2;
}
==================


-- 


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2009-06-10 15:51 ` reichelt at gcc dot gnu dot org
@ 2009-07-09 15:32 ` rguenth at gcc dot gnu dot org
  2009-07-10 22:36 ` hubicka at ucw dot cz
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-09 15:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-07-09 15:32 -------
#1  0x00000000008c8613 in can_be_reached_by_runtime (contains_stmt=0x188ab30, 
    r=0x7ffff5fc33f0) at /space/rguenther/src/svn/trunk/gcc/except.c:569
569                 EXECUTE_IF_SET_IN_BITMAP (i->aka, 0, n, bi)
(gdb) p i->aka
$1 = (bitmap) 0x0


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2009-07-09 15:32 ` rguenth at gcc dot gnu dot org
@ 2009-07-10 22:36 ` hubicka at ucw dot cz
  2009-07-11 19:08 ` hubicka at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hubicka at ucw dot cz @ 2009-07-10 22:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hubicka at ucw dot cz  2009-07-10 22:36 -------
Subject: Re:  [4.5 Regression] another null pointer in
remove_unreachable_regions

> 569                 EXECUTE_IF_SET_IN_BITMAP (i->aka, 0, n, bi)
> (gdb) p i->aka
> $1 = (bitmap) 0x0
oops, forgot about this issue.  Testing obvious patch checking for
i->aka being NULL.


-- 


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2009-07-10 22:36 ` hubicka at ucw dot cz
@ 2009-07-11 19:08 ` hubicka at gcc dot gnu dot org
  2009-07-12 18:33 ` hjl dot tools at gmail dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2009-07-11 19:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from hubicka at gcc dot gnu dot org  2009-07-11 19:08 -------
Fixed.


-- 

hubicka at gcc dot gnu dot org changed:

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


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (8 preceding siblings ...)
  2009-07-12 18:33 ` hjl dot tools at gmail dot com
@ 2009-07-12 18:33 ` hjl dot tools at gmail dot com
  2009-07-12 20:23 ` jason at gcc dot gnu dot org
  2009-07-12 22:44 ` hubicka at ucw dot cz
  11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-12 18:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from hjl dot tools at gmail dot com  2009-07-12 18:33 -------
The same failure happens on Linux/Intel64 and Linux/ia64.


-- 

hjl dot tools at gmail dot com changed:

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


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2009-07-11 19:08 ` hubicka at gcc dot gnu dot org
@ 2009-07-12 18:33 ` hjl dot tools at gmail dot com
  2009-07-12 18:33 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-12 18:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from hjl dot tools at gmail dot com  2009-07-12 18:32 -------
It doesn't work. On Linux/ia32, I got

FAIL: g++.dg/torture/pr40388.C  -O0  (test for excess errors)
FAIL: g++.dg/torture/pr40388.C  -O1  (test for excess errors)
FAIL: g++.dg/torture/pr40388.C  -O2  (test for excess errors)
FAIL: g++.dg/torture/pr40388.C  -O3 -fomit-frame-pointer  (test for excess
errors)
FAIL: g++.dg/torture/pr40388.C  -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr40388.C  -Os  (test for excess errors)


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2009-06-22 01:18:11         |2009-07-12 18:32:53
               date|                            |


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (9 preceding siblings ...)
  2009-07-12 18:33 ` hjl dot tools at gmail dot com
@ 2009-07-12 20:23 ` jason at gcc dot gnu dot org
  2009-07-12 22:44 ` hubicka at ucw dot cz
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-07-12 20:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jason at gcc dot gnu dot org  2009-07-12 20:23 -------
The testsuite failure was due to a double paste into the testcase; fixing that
maxes it work.


-- 

jason at gcc dot gnu dot org changed:

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


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


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

* [Bug middle-end/40388] [4.5 Regression] another null pointer in remove_unreachable_regions
  2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
                   ` (10 preceding siblings ...)
  2009-07-12 20:23 ` jason at gcc dot gnu dot org
@ 2009-07-12 22:44 ` hubicka at ucw dot cz
  11 siblings, 0 replies; 13+ messages in thread
From: hubicka at ucw dot cz @ 2009-07-12 22:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from hubicka at ucw dot cz  2009-07-12 22:44 -------
Subject: Re:  [4.5 Regression] another null pointer in
remove_unreachable_regions

> The testsuite failure was due to a double paste into the testcase; fixing that
> maxes it work.

Uh, double application of patch..
Thanks for fixing it!


-- 


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


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

end of thread, other threads:[~2009-07-12 22:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-09 13:04 [Bug c++/40388] New: another null pointer in remove_unreachable_regions dcb314 at hotmail dot com
2009-06-09 14:27 ` [Bug middle-end/40388] [4.5 Regression] " rguenth at gcc dot gnu dot org
2009-06-10  8:28 ` dcb314 at hotmail dot com
2009-06-10 12:01 ` hjl dot tools at gmail dot com
2009-06-10 14:43 ` reichelt at gcc dot gnu dot org
2009-06-10 15:51 ` reichelt at gcc dot gnu dot org
2009-07-09 15:32 ` rguenth at gcc dot gnu dot org
2009-07-10 22:36 ` hubicka at ucw dot cz
2009-07-11 19:08 ` hubicka at gcc dot gnu dot org
2009-07-12 18:33 ` hjl dot tools at gmail dot com
2009-07-12 18:33 ` hjl dot tools at gmail dot com
2009-07-12 20:23 ` jason at gcc dot gnu dot org
2009-07-12 22:44 ` hubicka at ucw dot cz

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).