public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/38732]  New: Openoffice.org segfaults with runtime libs built from GCC trunk
@ 2009-01-05 19:59 doko at ubuntu dot com
  2009-01-05 20:10 ` [Bug other/38732] " pinskia at gcc dot gnu dot org
                   ` (20 more replies)
  0 siblings, 21 replies; 23+ messages in thread
From: doko at ubuntu dot com @ 2009-01-05 19:59 UTC (permalink / raw)
  To: gcc-bugs

[forwarded from http://bugs.debian.org/504323]

Stephan Bergmann writes:

Reproducing with libstdc++.so.6 and libgcc_s.so.1 from gcc-4.4-20090102 
in unxlngi6.pro DEV300m38 OOo, the problem is that OOo at 
<http://svn.services.openoffice.org/ooo/tags/DEV300_m38/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx> 
l. 52 assumes a layout of struct __cxa_exception as given in section 
2.2.1 of <http://www.codesourcery.com/public/cxx-abi/abi-eh.html>, while 
GCC 4.4 added a new member

  _Atomic_word referenceCount;

to the start of the struct at 
gcc-4.4-20090102/libstc++-v3/libsupc++/unwind-cxx.h l. 57.  OOo tries to 
get at information stored in the __cxa_exception header in the 
destructor function passed to __cxa_throw (function deleteException at 
<http://svn.services.openoffice.org/ooo/tags/DEV300_m38/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx> 
l. 213), which now fails.

Please somebody clarify if GCC 4.4 adding a new member to struct 
__cxa_exception (and thus deviating from 
<http://www.codesourcery.com/public/cxx-abi/abi-eh.html>) is intended or 
is a mistake.

If it is intended, the OOo code needs to be changed (the information 
deleteException is now trying to retrieve from the __cxa_exception 
header must instead be encoded in the deleteException function itself, 
by dynamically creating instances of deleteException as is already done 
in the OOo bridges for Solaris).  If it is a mistake, the OOo code can 
stay as is and the GCC 4.4 code needs to be changed instead.


-- 
           Summary: Openoffice.org segfaults with runtime libs built from
                    GCC trunk
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: doko at ubuntu dot com


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


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

* [Bug other/38732] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
@ 2009-01-05 20:10 ` pinskia at gcc dot gnu dot org
  2009-01-05 20:18 ` [Bug other/38732] [4.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-05 20:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-01-05 20:10 -------
2008-08-23  Sebastian Redl <sebastian.redl@getdesigned.at>

        Add (again) exception propagation support as per N2179.  Feature is
        available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.

This is to support C++0x.


-- 


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
  2009-01-05 20:10 ` [Bug other/38732] " pinskia at gcc dot gnu dot org
@ 2009-01-05 20:18 ` pinskia at gcc dot gnu dot org
  2009-01-05 20:19 ` pinskia at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-05 20:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |blocker
           Keywords|                            |ABI
            Summary|Openoffice.org segfaults    |[4.4 Regression]
                   |with runtime libs built from|Openoffice.org segfaults
                   |GCC trunk                   |with runtime libs built from
                   |                            |GCC trunk
   Target Milestone|---                         |4.4.0


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
  2009-01-05 20:10 ` [Bug other/38732] " pinskia at gcc dot gnu dot org
  2009-01-05 20:18 ` [Bug other/38732] [4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2009-01-05 20:19 ` pinskia at gcc dot gnu dot org
  2009-01-05 20:20 ` pinskia at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-05 20:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2009-01-05 20:19 -------
*** Bug 38631 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bero at arklinux dot org


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (2 preceding siblings ...)
  2009-01-05 20:19 ` pinskia at gcc dot gnu dot org
@ 2009-01-05 20:20 ` pinskia at gcc dot gnu dot org
  2009-01-05 21:32 ` schwab at suse dot de
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-05 20:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2009-01-05 20:20 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-05 20:20:08
               date|                            |


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (3 preceding siblings ...)
  2009-01-05 20:20 ` pinskia at gcc dot gnu dot org
@ 2009-01-05 21:32 ` schwab at suse dot de
  2009-01-05 22:16 ` schwab at suse dot de
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: schwab at suse dot de @ 2009-01-05 21:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from schwab at suse dot de  2009-01-05 21:31 -------
>From the ABI document (2.2.1 C++ Exception Objects):
By convention, a __cxa_exception pointer points at the C++ object representing
the exception being thrown, immediately following the header. The header
structure is accessed at a negative offset from the __cxa_exception pointer. 
This layout allows consistent treatment of exception objects from different
languages (or different implementations of the same language), and allows
future extensions of the header structure while maintaining binary
compatibility.

Thus there should be no ABI breakage, unless there is an alignment issue.


-- 


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (4 preceding siblings ...)
  2009-01-05 21:32 ` schwab at suse dot de
@ 2009-01-05 22:16 ` schwab at suse dot de
  2009-01-05 22:19 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: schwab at suse dot de @ 2009-01-05 22:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from schwab at suse dot de  2009-01-05 22:16 -------
There is padding between adjustedPtr and unwindHeader because the latter is
forced to be maximally aligned.  Due to the additional member the padding was
reduced.  Also, the alignment of _Unwind_Exception depends on -mavx.


-- 


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (5 preceding siblings ...)
  2009-01-05 22:16 ` schwab at suse dot de
@ 2009-01-05 22:19 ` pinskia at gcc dot gnu dot org
  2009-01-05 22:52 ` hjl dot tools at gmail dot com
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-05 22:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2009-01-05 22:19 -------
>Also, the alignment of _Unwind_Exception depends on -mavx.

That is a target issue and should be filed as separately.


-- 


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (6 preceding siblings ...)
  2009-01-05 22:19 ` pinskia at gcc dot gnu dot org
@ 2009-01-05 22:52 ` hjl dot tools at gmail dot com
  2009-01-05 22:53 ` hjl dot tools at gmail dot com
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-05 22:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2009-01-05 22:51 -------
(In reply to comment #5)
> There is padding between adjustedPtr and unwindHeader because the latter is
> forced to be maximally aligned.  Due to the additional member the padding was
> reduced.  Also, the alignment of _Unwind_Exception depends on -mavx.
> 

I don't see any need for extra alignment on _Unwind_Exception:

struct _Unwind_Exception
{
  _Unwind_Exception_Class exception_class;
  _Unwind_Exception_Cleanup_Fn exception_cleanup;
  _Unwind_Word private_1;
  _Unwind_Word private_2;

  /* @@@ The IA-64 ABI says that this structure must be double-word aligned.
     Taking that literally does not make much sense generically.  Instead we
     provide the maximum alignment required by any type for the machine.  */
} __attribute__((__aligned__));

I think it should have a fixed alignment for a given target.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl dot tools at gmail dot
                   |                            |com, Joey dot ye at intel
                   |                            |dot com, xuepeng dot guo at
                   |                            |intel dot com


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (7 preceding siblings ...)
  2009-01-05 22:52 ` hjl dot tools at gmail dot com
@ 2009-01-05 22:53 ` hjl dot tools at gmail dot com
  2009-01-05 22:55 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-05 22:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from hjl dot tools at gmail dot com  2009-01-05 22:53 -------
There are

i386/i386.h:#define BIGGEST_ALIGNMENT (TARGET_AVX ? 256: 128)
m68k/m68k.h:#define BIGGEST_ALIGNMENT (TARGET_ALIGN_INT ? 32 : 16)
mcore/mcore.h:#define BIGGEST_ALIGNMENT  (TARGET_8ALIGN ? 64 : 32)
sh/sh.h:#define BIGGEST_ALIGNMENT  (TARGET_ALIGN_DOUBLE ? 64 : 32)
sparc/sparc.h:#define BIGGEST_ALIGNMENT (TARGET_ARCH64 ? 128 : 64)


-- 


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (8 preceding siblings ...)
  2009-01-05 22:53 ` hjl dot tools at gmail dot com
@ 2009-01-05 22:55 ` pinskia at gcc dot gnu dot org
  2009-01-05 22:59 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-05 22:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2009-01-05 22:55 -------
(In reply to comment #8)
> There are
> 
> i386/i386.h:#define BIGGEST_ALIGNMENT (TARGET_AVX ? 256: 128)
> m68k/m68k.h:#define BIGGEST_ALIGNMENT (TARGET_ALIGN_INT ? 32 : 16)
> mcore/mcore.h:#define BIGGEST_ALIGNMENT  (TARGET_8ALIGN ? 64 : 32)
> sh/sh.h:#define BIGGEST_ALIGNMENT  (TARGET_ALIGN_DOUBLE ? 64 : 32)
> sparc/sparc.h:#define BIGGEST_ALIGNMENT (TARGET_ARCH64 ? 128 : 64)
> 

Yes but if you look at the options that the other targets uses for
BIGGEST_ALIGNMENT are ABI changing options and not just processor changing
options.


-- 


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (9 preceding siblings ...)
  2009-01-05 22:55 ` pinskia at gcc dot gnu dot org
@ 2009-01-05 22:59 ` pinskia at gcc dot gnu dot org
  2009-01-05 23:09 ` hjl dot tools at gmail dot com
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-05 22:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2009-01-05 22:59 -------
(In reply to comment #8)
> There are

I filed the x86 issue with -mavx as PR 38736.  This is a regression and really
needs to be fixed for before the release of 4.4.


-- 


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (10 preceding siblings ...)
  2009-01-05 22:59 ` pinskia at gcc dot gnu dot org
@ 2009-01-05 23:09 ` hjl dot tools at gmail dot com
  2009-01-06  9:13 ` stephan dot bergmann at sun dot com
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-05 23:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from hjl dot tools at gmail dot com  2009-01-05 23:08 -------
(In reply to comment #7)
> (In reply to comment #5)
> > There is padding between adjustedPtr and unwindHeader because the latter is
> > forced to be maximally aligned.  Due to the additional member the padding was
> > reduced.  Also, the alignment of _Unwind_Exception depends on -mavx.
> > 
> 
> I don't see any need for extra alignment on _Unwind_Exception:
> 
> struct _Unwind_Exception
> {
>   _Unwind_Exception_Class exception_class;
>   _Unwind_Exception_Cleanup_Fn exception_cleanup;
>   _Unwind_Word private_1;
>   _Unwind_Word private_2;
> 
>   /* @@@ The IA-64 ABI says that this structure must be double-word aligned.
>      Taking that literally does not make much sense generically.  Instead we
>      provide the maximum alignment required by any type for the machine.  */
> } __attribute__((__aligned__));
> 
> I think it should have a fixed alignment for a given target.
> 

The ia64 psABI says _Unwind_Exception should be aligned at
double-word. But it isn't very clear what is the size of
double-word.  It does say "long long" is 8 byte doubleword.
We have

[hjl@gnu-6 config]$ grep BIGGEST_ALIGNMENT ia64/ia64.h
#define BIGGEST_ALIGNMENT 128
[hjl@gnu-6 config]$ 

We can't change it now no matter what the size of
double-word is.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|38737                       |


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (11 preceding siblings ...)
  2009-01-05 23:09 ` hjl dot tools at gmail dot com
@ 2009-01-06  9:13 ` stephan dot bergmann at sun dot com
  2009-01-06 13:35 ` jakub at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: stephan dot bergmann at sun dot com @ 2009-01-06  9:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from stephan dot bergmann at sun dot com  2009-01-06 09:12 -------
I was a bit sloppy in what I wrote before (i.e., in what Matthias turned into
the description of this bug); it is the change of offsets of __cxa_exception
members caused by the addition of referenceCount that causes problems for OOo: 
In the OOo-supplied exception destructor function (which receives a pointer P
pointing just past the __cxa_exception header), OOo assumes to access the
__cxa_exception member exceptionType at P - 80 bytes.  From my reading of
<http://www.codesourcery.com/public/cxx-abi/abi-eh.html> I think OOo is correct
in making this assumption, if GCC conforms to that ABI.  However, the addition
of a referenceCount member to the front of GCC's __cxa_exception unfortunately
causes the "backwards offset" of exceptionType to change from -80 to -76 bytes
(as the four bytes of referenceCount cancel out a previous four padding bytes
just before the unwindHeader member coming later in the struct).

>From the comments to this bug so far, I am not sure whether the GCC maintainers
(a) acknowledge this and will fix it (in which case I do not need to modify
OOo), or
(b) acknowledge this but consider OOo to be using undocumented internals of GCC
that legitimately changed (in which case I will need to modify OOo), or rather
(c) consider alignment issues of unwindHeader instead (which I think are
irrelevant to my problem).


-- 

stephan dot bergmann at sun dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stephan dot bergmann at sun
                   |                            |dot com


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


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

* [Bug other/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (12 preceding siblings ...)
  2009-01-06  9:13 ` stephan dot bergmann at sun dot com
@ 2009-01-06 13:35 ` jakub at gcc dot gnu dot org
  2009-01-07 12:23 ` [Bug libstdc++/38732] " paolo dot carlini at oracle dot com
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-06 13:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jakub at gcc dot gnu dot org  2009-01-06 13:35 -------
So, referenceCount needs to be in any case nuked from struct __cxa_exception.
IMHO, either we define (probably in a different namespace)
struct __cxa_exception_with_refcount
{
  _Atomic_word referenceCount;
  struct __cxa_exception exc;
};
and corresponding __get_exception_header_with_refcount_from_{obj,ue}
and use this one where needed (at least in eh_alloc.c, eh_ptr.cc and
eh_throw.cc), or we just allocate space for one _Atomic_word before the struct
(i.e. allocate extra MAX (__alignof__ (__cxa_exception), sizeof (_Atomic_word))
before it) and use a macro (and or inline) to get address of referenceCount
_Atomic_word before the __cxa_exception struct.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at gcc dot gnu dot org,
                   |                            |paolo at gcc dot gnu dot org
           Priority|P3                          |P1


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


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

* [Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (13 preceding siblings ...)
  2009-01-06 13:35 ` jakub at gcc dot gnu dot org
@ 2009-01-07 12:23 ` paolo dot carlini at oracle dot com
  2009-01-07 12:34 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-01-07 12:23 UTC (permalink / raw)
  To: gcc-bugs



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


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

* [Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (14 preceding siblings ...)
  2009-01-07 12:23 ` [Bug libstdc++/38732] " paolo dot carlini at oracle dot com
@ 2009-01-07 12:34 ` jakub at gcc dot gnu dot org
  2009-01-07 13:57 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-07 12:34 UTC (permalink / raw)
  To: gcc-bugs



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


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

* [Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (15 preceding siblings ...)
  2009-01-07 12:34 ` jakub at gcc dot gnu dot org
@ 2009-01-07 13:57 ` jakub at gcc dot gnu dot org
  2009-01-07 21:14 ` sebastian dot redl at getdesigned dot at
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-07 13:57 UTC (permalink / raw)
  To: gcc-bugs



------- 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=17047&action=view)
gcc44-pr38732.patch

Patch I'm going to bootstrap/regtest.


-- 


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


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

* [Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (16 preceding siblings ...)
  2009-01-07 13:57 ` jakub at gcc dot gnu dot org
@ 2009-01-07 21:14 ` sebastian dot redl at getdesigned dot at
  2009-01-07 22:51 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: sebastian dot redl at getdesigned dot at @ 2009-01-07 21:14 UTC (permalink / raw)
  To: gcc-bugs



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


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

* [Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (17 preceding siblings ...)
  2009-01-07 21:14 ` sebastian dot redl at getdesigned dot at
@ 2009-01-07 22:51 ` jakub at gcc dot gnu dot org
  2009-01-07 22:55 ` jakub at gcc dot gnu dot org
  2009-01-08  8:32 ` stephan dot bergmann at sun dot com
  20 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-07 22:51 UTC (permalink / raw)
  To: gcc-bugs



------- 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=gcc&view=rev&rev=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


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

* [Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (18 preceding siblings ...)
  2009-01-07 22:51 ` jakub at gcc dot gnu dot org
@ 2009-01-07 22:55 ` jakub at gcc dot gnu dot org
  2009-01-08  8:32 ` stephan dot bergmann at sun dot com
  20 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-07 22:55 UTC (permalink / raw)
  To: gcc-bugs



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


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

* [Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
  2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
                   ` (19 preceding siblings ...)
  2009-01-07 22:55 ` jakub at gcc dot gnu dot org
@ 2009-01-08  8:32 ` stephan dot bergmann at sun dot com
  20 siblings, 0 replies; 23+ messages in thread
From: stephan dot bergmann at sun dot com @ 2009-01-08  8:32 UTC (permalink / raw)
  To: gcc-bugs



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


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

* [Bug libstdc++/38732] [4.4 Regression] Openoffice.org segfaults with runtime libs built from GCC trunk
       [not found] <bug-38732-4@http.gcc.gnu.org/bugzilla/>
@ 2024-06-23 13:27 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-23 13:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> 2008-08-23  Sebastian Redl <sebastian.redl@getdesigned.at>
>         
>         Add (again) exception propagation support as per N2179.  Feature is
>         available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
> 
> This is to support C++0x.

For reference this is commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=30a333ceeb9141e67663c6151983a12678dcc329

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

end of thread, other threads:[~2024-06-23 13:27 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-05 19:59 [Bug other/38732] New: Openoffice.org segfaults with runtime libs built from GCC trunk doko at ubuntu dot com
2009-01-05 20:10 ` [Bug other/38732] " pinskia at gcc dot gnu dot org
2009-01-05 20:18 ` [Bug other/38732] [4.4 Regression] " pinskia at gcc dot gnu dot org
2009-01-05 20:19 ` pinskia at gcc dot gnu dot org
2009-01-05 20:20 ` pinskia at gcc dot gnu dot org
2009-01-05 21:32 ` schwab at suse dot de
2009-01-05 22:16 ` schwab at suse dot de
2009-01-05 22:19 ` pinskia at gcc dot gnu dot org
2009-01-05 22:52 ` hjl dot tools at gmail dot com
2009-01-05 22:53 ` hjl dot tools at gmail dot com
2009-01-05 22:55 ` pinskia at gcc dot gnu dot org
2009-01-05 22:59 ` pinskia at gcc dot gnu dot org
2009-01-05 23:09 ` hjl dot tools at gmail dot com
2009-01-06  9:13 ` stephan dot bergmann at sun dot com
2009-01-06 13:35 ` jakub at gcc dot gnu dot org
2009-01-07 12:23 ` [Bug libstdc++/38732] " paolo dot carlini at oracle dot com
2009-01-07 12:34 ` jakub at gcc dot gnu dot org
2009-01-07 13:57 ` jakub at gcc dot gnu dot org
2009-01-07 21:14 ` sebastian dot redl at getdesigned dot at
2009-01-07 22:51 ` jakub at gcc dot gnu dot org
2009-01-07 22:55 ` jakub at gcc dot gnu dot org
2009-01-08  8:32 ` stephan dot bergmann at sun dot com
     [not found] <bug-38732-4@http.gcc.gnu.org/bugzilla/>
2024-06-23 13:27 ` pinskia at gcc dot gnu.org

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