Launchpad has imported 7 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44679.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2010-06-26T10:19:31+00:00 Matthias Klose wrote:

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

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/598670/comments/6

------------------------------------------------------------------------
On 2010-06-26T11:27:05+00:00 Paolo-carlini wrote:

Jon, can you have a quick look to this? Thanks in advance

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/598670/comments/7

------------------------------------------------------------------------
On 2010-06-26T14:01:18+00:00 Redi wrote:

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!

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/598670/comments/8

------------------------------------------------------------------------
On 2010-06-26T14:51:45+00:00 Redi wrote:

closing for the reasons given above

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/598670/comments/9

------------------------------------------------------------------------
On 2010-06-28T16:03:27+00:00 Rguenth wrote:

(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?


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/598670/comments/10

------------------------------------------------------------------------
On 2010-06-28T16:12:50+00:00 Paolo-carlini wrote:

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.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/598670/comments/11

------------------------------------------------------------------------
On 2010-06-28T16:14:46+00:00 Paolo-carlini wrote:

Actually 4.5 is fine too ;)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/598670/comments/12

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/598670

Title:
  [PR44679] condition_variable_any not stack protector safe

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/598670/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to