public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42649]  New: Optimizer breaks boost shared_ptr
@ 2010-01-07 16:42 rlogel at navtech dot aero
  2010-01-07 16:46 ` [Bug c++/42649] " rlogel at navtech dot aero
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: rlogel at navtech dot aero @ 2010-01-07 16:42 UTC (permalink / raw)
  To: gcc-bugs




-- 
           Summary: Optimizer breaks boost shared_ptr
           Product: gcc
           Version: 3.4.6
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rlogel at navtech dot aero
  GCC host triplet: i386-redhat-linux


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


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

* [Bug c++/42649] Optimizer breaks boost shared_ptr
  2010-01-07 16:42 [Bug c++/42649] New: Optimizer breaks boost shared_ptr rlogel at navtech dot aero
@ 2010-01-07 16:46 ` rlogel at navtech dot aero
  2010-01-07 16:50 ` rlogel at navtech dot aero
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: rlogel at navtech dot aero @ 2010-01-07 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rlogel at navtech dot aero  2010-01-07 16:46 -------
Created an attachment (id=19500)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19500&action=view)
Shared Pointer Test Program

This test program shows that the shared_ptr reference counter isn't being
incremented during assignment.  As a result the pointer can get deleted before
all references are destructed. 


-- 


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


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

* [Bug c++/42649] Optimizer breaks boost shared_ptr
  2010-01-07 16:42 [Bug c++/42649] New: Optimizer breaks boost shared_ptr rlogel at navtech dot aero
  2010-01-07 16:46 ` [Bug c++/42649] " rlogel at navtech dot aero
@ 2010-01-07 16:50 ` rlogel at navtech dot aero
  2010-01-07 16:51 ` [Bug c++/42649] Optimizer breaks boost 1.41 shared_ptr rlogel at navtech dot aero
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: rlogel at navtech dot aero @ 2010-01-07 16:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rlogel at navtech dot aero  2010-01-07 16:49 -------
# Vaild Excutable
g++ -v -save-temps -o shared_ptr_test.exc shared_ptr_test.cpp      

# Invalid Excutable
g++ -v -save-temps -O2 -o shared_ptr_test.exc shared_ptr_test.cpp

GCC output:
$ g++ -v -save-temps -O2 -o shared_ptr_test.exc shared_ptr_test.cpp 
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)
 /usr/libexec/gcc/i386-redhat-linux/3.4.6/cc1plus -E -quiet -v -D_GNU_SOURCE
shared_ptr_test.cpp -O2 -o shared_ptr_test.ii
ignoring nonexistent directory
"/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6

/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/i386-redhat-linux
 /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward
 /usr/local/include
 /usr/lib/gcc/i386-redhat-linux/3.4.6/include
 /usr/include
End of search list.
 /usr/libexec/gcc/i386-redhat-linux/3.4.6/cc1plus -fpreprocessed
shared_ptr_test.ii -quiet -dumpbase shared_ptr_test.cpp -auxbase
shared_ptr_test -O2 -version -o shared_ptr_test.s
GNU C++ version 3.4.6 20060404 (Red Hat 3.4.6-9) (i386-redhat-linux)
        compiled by GNU C version 3.4.6 20060404 (Red Hat 3.4.6-9).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 as -V -Qy -o shared_ptr_test.o shared_ptr_test.s
GNU assembler version 2.15.92.0.2 (i386-redhat-linux) using BFD version
2.15.92.0.2 20040927
 /usr/libexec/gcc/i386-redhat-linux/3.4.6/collect2 --eh-frame-hdr -m elf_i386
-dynamic-linker /lib/ld-linux.so.2 -o shared_ptr_test.exc
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crt1.o
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crti.o
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtbegin.o
-L/usr/lib/gcc/i386-redhat-linux/3.4.6 -L/usr/lib/gcc/i386-redhat-linux/3.4.6
-L/usr/lib/gcc/i386-redhat-linux/3.4.6/../../.. shared_ptr_test.o -lstdc++ -lm
-lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/i386-redhat-linux/3.4.6/crtend.o
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crtn.o


-- 


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


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

* [Bug c++/42649] Optimizer breaks boost 1.41 shared_ptr
  2010-01-07 16:42 [Bug c++/42649] New: Optimizer breaks boost shared_ptr rlogel at navtech dot aero
  2010-01-07 16:46 ` [Bug c++/42649] " rlogel at navtech dot aero
  2010-01-07 16:50 ` rlogel at navtech dot aero
@ 2010-01-07 16:51 ` rlogel at navtech dot aero
  2010-01-07 16:52 ` [Bug c++/42649] Optimizer breaks boost shared_ptr paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: rlogel at navtech dot aero @ 2010-01-07 16:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rlogel at navtech dot aero  2010-01-07 16:50 -------
Boost web page show that they tested 3.4.3 without any problems.


-- 

rlogel at navtech dot aero changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Optimizer breaks boost      |Optimizer breaks boost 1.41
                   |shared_ptr                  |shared_ptr


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


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

* [Bug c++/42649] Optimizer breaks boost shared_ptr
  2010-01-07 16:42 [Bug c++/42649] New: Optimizer breaks boost shared_ptr rlogel at navtech dot aero
                   ` (2 preceding siblings ...)
  2010-01-07 16:51 ` [Bug c++/42649] Optimizer breaks boost 1.41 shared_ptr rlogel at navtech dot aero
@ 2010-01-07 16:52 ` paolo dot carlini at oracle dot com
  2010-01-07 16:56 ` rlogel at navtech dot aero
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-07 16:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from paolo dot carlini at oracle dot com  2010-01-07 16:52 -------
3.4.6?!? Please, try current, maintained, releases, gcc4.3.x or, better,
gcc4.4.x, and in case open an appropriate PR. Thanks.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
            Summary|Optimizer breaks boost 1.41 |Optimizer breaks boost
                   |shared_ptr                  |shared_ptr


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


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

* [Bug c++/42649] Optimizer breaks boost shared_ptr
  2010-01-07 16:42 [Bug c++/42649] New: Optimizer breaks boost shared_ptr rlogel at navtech dot aero
                   ` (3 preceding siblings ...)
  2010-01-07 16:52 ` [Bug c++/42649] Optimizer breaks boost shared_ptr paolo dot carlini at oracle dot com
@ 2010-01-07 16:56 ` rlogel at navtech dot aero
  2010-01-07 17:18   ` Andrew Pinski
  2010-01-07 17:02 ` paolo dot carlini at oracle dot com
  2010-01-07 17:18 ` pinskia at gmail dot com
  6 siblings, 1 reply; 9+ messages in thread
From: rlogel at navtech dot aero @ 2010-01-07 16:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rlogel at navtech dot aero  2010-01-07 16:56 -------
I realize that 3.4.6 is very old, but we need to support RedHat Enterprise 4
builds which use gcc 3.4.6.  We would rather not undertake upgrading to gcc 4.x
because we have a large legacy code base, some of which uses writeable strings.


-- 

rlogel at navtech dot aero changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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

* [Bug c++/42649] Optimizer breaks boost shared_ptr
  2010-01-07 16:42 [Bug c++/42649] New: Optimizer breaks boost shared_ptr rlogel at navtech dot aero
                   ` (4 preceding siblings ...)
  2010-01-07 16:56 ` rlogel at navtech dot aero
@ 2010-01-07 17:02 ` paolo dot carlini at oracle dot com
  2010-01-07 17:18 ` pinskia at gmail dot com
  6 siblings, 0 replies; 9+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-07 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from paolo dot carlini at oracle dot com  2010-01-07 17:02 -------
Yes, but it's totally unmaintained, I'm sorry, we don't get PRs for
unmaintained branches, that's the policy.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c++/42649] Optimizer breaks boost shared_ptr
  2010-01-07 16:42 [Bug c++/42649] New: Optimizer breaks boost shared_ptr rlogel at navtech dot aero
                   ` (5 preceding siblings ...)
  2010-01-07 17:02 ` paolo dot carlini at oracle dot com
@ 2010-01-07 17:18 ` pinskia at gmail dot com
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gmail dot com @ 2010-01-07 17:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gmail dot com  2010-01-07 17:18 -------
Subject: Re:  Optimizer breaks boost shared_ptr



Sent from my iPhone

On Jan 7, 2010, at 8:56 AM, "rlogel at navtech dot aero"
<gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #5 from rlogel at navtech dot aero  2010-01-07 16:56  
> -------
> I realize that 3.4.6 is very old, but we need to support RedHat  
> Enterprise 4
> builds which use gcc 3.4.6.

Then report this bug to redhat since you have a support contract with  
them. Also you are using a redhat modified gcc so reporting to them  
first is the correct thing to do.


> We would rather not undertake upgrading to gcc 4.x
> because we have a large legacy code base, some of which uses  
> writeable strings.
>
>
> -- 
>
> rlogel at navtech dot aero changed:
>
>           What    |Removed                     |Added
> --- 
> --- 
> ----------------------------------------------------------------------
>           Severity|normal                      |critical
>             Status|RESOLVED                    |UNCONFIRMED
>         Resolution|INVALID                     |
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42649
>


-- 


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


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

* Re: [Bug c++/42649] Optimizer breaks boost shared_ptr
  2010-01-07 16:56 ` rlogel at navtech dot aero
@ 2010-01-07 17:18   ` Andrew Pinski
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Pinski @ 2010-01-07 17:18 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs



Sent from my iPhone

On Jan 7, 2010, at 8:56 AM, "rlogel at navtech dot aero" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #5 from rlogel at navtech dot aero  2010-01-07 16:56  
> -------
> I realize that 3.4.6 is very old, but we need to support RedHat  
> Enterprise 4
> builds which use gcc 3.4.6.

Then report this bug to redhat since you have a support contract with  
them. Also you are using a redhat modified gcc so reporting to them  
first is the correct thing to do.


> We would rather not undertake upgrading to gcc 4.x
> because we have a large legacy code base, some of which uses  
> writeable strings.
>
>
> -- 
>
> rlogel at navtech dot aero changed:
>
>           What    |Removed                     |Added
> --- 
> --- 
> ----------------------------------------------------------------------
>           Severity|normal                      |critical
>             Status|RESOLVED                    |UNCONFIRMED
>         Resolution|INVALID                     |
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42649
>


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

end of thread, other threads:[~2010-01-07 17:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-07 16:42 [Bug c++/42649] New: Optimizer breaks boost shared_ptr rlogel at navtech dot aero
2010-01-07 16:46 ` [Bug c++/42649] " rlogel at navtech dot aero
2010-01-07 16:50 ` rlogel at navtech dot aero
2010-01-07 16:51 ` [Bug c++/42649] Optimizer breaks boost 1.41 shared_ptr rlogel at navtech dot aero
2010-01-07 16:52 ` [Bug c++/42649] Optimizer breaks boost shared_ptr paolo dot carlini at oracle dot com
2010-01-07 16:56 ` rlogel at navtech dot aero
2010-01-07 17:18   ` Andrew Pinski
2010-01-07 17:02 ` paolo dot carlini at oracle dot com
2010-01-07 17:18 ` pinskia at gmail dot com

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