public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/44679]  New: [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5)
@ 2010-06-26 10:19 doko at ubuntu dot com
  2010-06-26 11:27 ` [Bug libstdc++/44679] " paolo dot carlini at oracle dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: doko at ubuntu dot com @ 2010-06-26 10:19 UTC (permalink / raw)
  To: gcc-bugs

building 30_threads/condition_variable_any/cons/1.cc with the 4.4 branch

g++ -fstack-protector -std=c++0x any.cc -o any

and running the binary on a system with the shared libstdc++.so installed from
the 4.5 branch aborts.

#include <condition_variable>
#include <system_error>

int main()
{
  bool test __attribute__((unused)) = true;

  try 
    {
      std::condition_variable_any c1;
    }
  catch (const std::system_error& e)
    {
      perror("system_error");
      exit(1);
    }
  catch (...)
    {
      perror("system_error");
      exit(2);
    }

  return 0;
}


*** stack smashing detected ***: ./any terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7fae2e3c3947]
/lib/libc.so.6(__fortify_fail+0x0)[0x7fae2e3c3910]
./any[0x4009b7]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7fae2e2e2d8d]
./any[0x400839]
======= Memory map: ========
00400000-00401000 r-xp 00000000 09:01 8172845                           
/scratch/packages/gcc/4.4/u/any
00600000-00601000 rw-p 00000000 09:01 8172845                           
/scratch/packages/gcc/4.4/u/any
00748000-00769000 rw-p 00000000 00:00 0                                  [heap]
7fae2e2c4000-7fae2e43e000 r-xp 00000000 09:00 919600                    
/lib/libc-2.12.so
7fae2e43e000-7fae2e63e000 ---p 0017a000 09:00 919600                    
/lib/libc-2.12.so
7fae2e63e000-7fae2e642000 r--p 0017a000 09:00 919600                    
/lib/libc-2.12.so
7fae2e642000-7fae2e643000 rw-p 0017e000 09:00 919600                    
/lib/libc-2.12.so
7fae2e643000-7fae2e648000 rw-p 00000000 00:00 0
7fae2e648000-7fae2e65d000 r-xp 00000000 09:00 2888799                   
/usr/lib/gcc-snapshot/lib/libgcc_s.so.1
7fae2e65d000-7fae2e85c000 ---p 00015000 09:00 2888799                   
/usr/lib/gcc-snapshot/lib/libgcc_s.so.1
7fae2e85c000-7fae2e85d000 rw-p 00014000 09:00 2888799                   
/usr/lib/gcc-snapshot/lib/libgcc_s.so.1
7fae2e85d000-7fae2e8df000 r-xp 00000000 09:00 922106                    
/lib/libm-2.12.so
7fae2e8df000-7fae2eade000 ---p 00082000 09:00 922106                    
/lib/libm-2.12.so
7fae2eade000-7fae2eadf000 r--p 00081000 09:00 922106                    
/lib/libm-2.12.so
7fae2eadf000-7fae2eae0000 rw-p 00082000 09:00 922106                    
/lib/libm-2.12.so
7fae2eae0000-7fae2ebc4000 r-xp 00000000 09:00 2888785                   
/usr/lib/gcc-snapshot/lib/libstdc++.so.6.0.15
7fae2ebc4000-7fae2edc3000 ---p 000e4000 09:00 2888785                   
/usr/lib/gcc-snapshot/lib/libstdc++.so.6.0.15
7fae2edc3000-7fae2edcb000 r--p 000e3000 09:00 2888785                   
/usr/lib/gcc-snapshot/lib/libstdc++.so.6.0.15
7fae2edcb000-7fae2edcd000 rw-p 000eb000 09:00 2888785                   
/usr/lib/gcc-snapshot/lib/libstdc++.so.6.0.15
7fae2edcd000-7fae2ede2000 rw-p 00000000 00:00 0
7fae2ede2000-7fae2ee03000 r-xp 00000000 09:00 918062                    
/lib/ld-2.12.so
7fae2eff3000-7fae2eff8000 rw-p 00000000 00:00 0
7fae2f000000-7fae2f002000 rw-p 00000000 00:00 0
7fae2f002000-7fae2f003000 r--p 00020000 09:00 918062                    
/lib/ld-2.12.so
7fae2f003000-7fae2f004000 rw-p 00021000 09:00 918062                    
/lib/ld-2.12.so
7fae2f004000-7fae2f005000 rw-p 00000000 00:00 0
7fff0acec000-7fff0ad01000 rw-p 00000000 00:00 0                         
[stack]
7fff0ad9f000-7fff0ada0000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                 
[vsyscall]
Aborted


-- 
           Summary: [4.5/4.6 regression]
                    30_threads/condition_variable_any/cons/1.cc fails with -
                    fstack-protector (built with 4.4, run with 4.5)
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: doko at ubuntu dot com


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


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

* [Bug libstdc++/44679] [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5)
  2010-06-26 10:19 [Bug libstdc++/44679] New: [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5) doko at ubuntu dot com
@ 2010-06-26 11:27 ` paolo dot carlini at oracle dot com
  2010-06-26 14:01 ` redi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-26 11:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2010-06-26 11:27 -------
Jon, can you have a quick look to this? Thanks in advance


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu dot org


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


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

* [Bug libstdc++/44679] [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5)
  2010-06-26 10:19 [Bug libstdc++/44679] New: [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5) doko at ubuntu dot com
  2010-06-26 11:27 ` [Bug libstdc++/44679] " paolo dot carlini at oracle dot com
@ 2010-06-26 14:01 ` redi at gcc dot gnu dot org
  2010-06-26 14:51 ` redi at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-26 14:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from redi at gcc dot gnu dot org  2010-06-26 14:01 -------
condition_variable_any was completely broken in 4.4 and its ABi changed when we
implemented it for real. Obviously we can't preserve ABI between a broken,
incomplete implementation and a working one, so I'm not really worried about
this "bug". If anyone was able to use the condition_variable_any in 4.4 I'd
like to know how they did it!


-- 


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


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

* [Bug libstdc++/44679] [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5)
  2010-06-26 10:19 [Bug libstdc++/44679] New: [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5) doko at ubuntu dot com
  2010-06-26 11:27 ` [Bug libstdc++/44679] " paolo dot carlini at oracle dot com
  2010-06-26 14:01 ` redi at gcc dot gnu dot org
@ 2010-06-26 14:51 ` redi at gcc dot gnu dot org
  2010-06-28 16:03 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-26 14:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from redi at gcc dot gnu dot org  2010-06-26 14:51 -------
closing for the reasons given above


-- 

redi at gcc dot gnu dot org changed:

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


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


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

* [Bug libstdc++/44679] [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5)
  2010-06-26 10:19 [Bug libstdc++/44679] New: [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5) doko at ubuntu dot com
                   ` (2 preceding siblings ...)
  2010-06-26 14:51 ` redi at gcc dot gnu dot org
@ 2010-06-28 16:03 ` rguenth at gcc dot gnu dot org
  2010-06-28 16:13 ` paolo dot carlini at oracle dot com
  2010-06-28 16:14 ` paolo dot carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-28 16:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2010-06-28 16:03 -------
(In reply to comment #2)
> condition_variable_any was completely broken in 4.4 and its ABi changed when we
> implemented it for real. Obviously we can't preserve ABI between a broken,
> incomplete implementation and a working one, so I'm not really worried about
> this "bug". If anyone was able to use the condition_variable_any in 4.4 I'd
> like to know how they did it!

We should avoid exporting symbols for something that is broken or supposed
to change its ABI.  I think this is what was done in the past, why wasn't
it done here?


-- 


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


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

* [Bug libstdc++/44679] [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5)
  2010-06-26 10:19 [Bug libstdc++/44679] New: [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5) doko at ubuntu dot com
                   ` (3 preceding siblings ...)
  2010-06-28 16:03 ` rguenth at gcc dot gnu dot org
@ 2010-06-28 16:13 ` paolo dot carlini at oracle dot com
  2010-06-28 16:14 ` paolo dot carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-28 16:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from paolo dot carlini at oracle dot com  2010-06-28 16:12 -------
A (small) mistake? I think the hope at the time was that Chris Fairles would
soon contribute the rest of the work and the complete facility shipped the next
major release series. That didn't happen, unfortunately, and instead of
reverting all the first changes, we shipped just very few unusable bits, among
which a couple exported. Finally, 4.6 will be fine.


-- 


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


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

* [Bug libstdc++/44679] [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5)
  2010-06-26 10:19 [Bug libstdc++/44679] New: [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5) doko at ubuntu dot com
                   ` (4 preceding siblings ...)
  2010-06-28 16:13 ` paolo dot carlini at oracle dot com
@ 2010-06-28 16:14 ` paolo dot carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-28 16:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from paolo dot carlini at oracle dot com  2010-06-28 16:14 -------
Actually 4.5 is fine too ;)


-- 


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


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

end of thread, other threads:[~2010-06-28 16:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-26 10:19 [Bug libstdc++/44679] New: [4.5/4.6 regression] 30_threads/condition_variable_any/cons/1.cc fails with -fstack-protector (built with 4.4, run with 4.5) doko at ubuntu dot com
2010-06-26 11:27 ` [Bug libstdc++/44679] " paolo dot carlini at oracle dot com
2010-06-26 14:01 ` redi at gcc dot gnu dot org
2010-06-26 14:51 ` redi at gcc dot gnu dot org
2010-06-28 16:03 ` rguenth at gcc dot gnu dot org
2010-06-28 16:13 ` paolo dot carlini at oracle dot com
2010-06-28 16:14 ` paolo dot carlini at oracle 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).