[Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk

2009-01-08 Thread stephan dot bergmann at sun dot com


--- Comment #20 from stephan dot bergmann at sun dot com  2009-01-08 08:31 
---
re #c17:

prepended member can change the negative offset of the other struct members:
see the four bytes of referenceCount cancel out a previous four padding bytes
just before the unwindHeader member coming later in the struct (#c12)

if they ever use std::current_exception(), they *will* have to change the code
to cope with dependent exceptions: can you please elaborate (by direct mail,
if considered more appropriate)


-- 


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



[Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk

2009-01-07 Thread paolo dot carlini at oracle dot com


--- Comment #14 from paolo dot carlini at oracle dot com  2009-01-07 12:23 
---
Hi. Definitely, I like the first approach better. Jakub, are you willing to
work on it? Honestly, because I don't think it's the right time to play with
ABI issues, I'm ready to revert completely this piece of C++0x work for 4.4.0.


-- 


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



[Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk

2009-01-07 Thread jakub at gcc dot gnu dot org


--- Comment #15 from jakub at gcc dot gnu dot org  2009-01-07 12:34 ---
Working on it.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2009-01-05 20:20:08 |2009-01-07 12:34:26
   date||


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



[Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk

2009-01-07 Thread jakub at gcc dot gnu dot org


--- Comment #16 from jakub at gcc dot gnu dot org  2009-01-07 13:56 ---
Created an attachment (id=17047)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17047action=view)
gcc44-pr38732.patch

Patch I'm going to bootstrap/regtest.


-- 


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



[Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk

2009-01-07 Thread sebastian dot redl at getdesigned dot at


--- Comment #17 from sebastian dot redl at getdesigned dot at  2009-01-07 
21:14 ---
I have no idea how a prepended member can change the negative offset of the
other struct members. If I did, the bug wouldn't be there.

Is wrapping the struct in another struct the best way to ensure that the layout
stays the same? If so, the patch looks good to me.

The OOo.org guys should perhaps add a note for future reference, that if they
ever use std::current_exception(), they *will* have to change the code to cope
with dependent exceptions.


-- 


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



[Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk

2009-01-07 Thread jakub at gcc dot gnu dot org


--- Comment #18 from jakub at gcc dot gnu dot org  2009-01-07 22:50 ---
Subject: Bug 38732

Author: jakub
Date: Wed Jan  7 22:50:42 2009
New Revision: 143170

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=143170
Log:
PR libstdc++/38732
* libsupc++/unwind-cxx.h (__cxxabiv1::__cxa_exception): Remove
referenceCount field again.
(__cxxabiv1::__cxa_refcounted_exception): New struct.
(__cxxabiv1::__get_refcounted_exception_header_from_obj,
__cxxabiv1::__get_refcounted_exception_header_from_ue): New static
inline functions.
* libsupc++/eh_alloc.cc (__cxxabiv1::__cxa_allocate_exception,
__cxxabiv1::__cxa_free_exception): Use __cxa_refcounted_exception
instead of __cxa_exception.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup,
__cxxabiv1::__cxa_throw): Likewise.
* libsupc++/eh_ptr.cc (std::rethrow_exception,
std::__exception_ptr::exception_ptr::_M_addref,
std::__exception_ptr::exception_ptr::_M_release,
__gxx_dependent_exception_cleanup): Likewise.
* testsuite/18_support/exception/38732.cc: New test.

Added:
trunk/libstdc++-v3/testsuite/18_support/exception/38732.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/libsupc++/eh_alloc.cc
trunk/libstdc++-v3/libsupc++/eh_ptr.cc
trunk/libstdc++-v3/libsupc++/eh_throw.cc
trunk/libstdc++-v3/libsupc++/unwind-cxx.h


-- 


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



[Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk

2009-01-07 Thread jakub at gcc dot gnu dot org


--- Comment #19 from jakub at gcc dot gnu dot org  2009-01-07 22:54 ---
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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