[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [udk-dev] Re: openoffice.org-core: Segmentation fault at startup



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.

On 12/22/08 21:04, Rene Engelhard wrote:
tag 504323 - moreinfo
tag 504323 - unreproducible
retitle 504323 openoffice.org-core: Segmentation fault at startup with gcc 4.4 libs
forwarded 504323 dev@udk.openoffice.org
thanks

[ dev@udk: as usual, please Cc all involved! ]

Hi,

Florian Goujeon wrote:
It was indeed my mistake. I'm working with GCC4.4 svn and installed it in /usr/local. OOo, instead of using the straight /usr/lib's libgcc_s.so.1, used the unstable /usr/local/lib's one. Everything went back to normal once I uninstalled GCC4.4 svn.

Yes, confirmed. I get the same crash when setting LD_LIBRARY_PATH to
/usr/lib/gcc-snapshot/lib.

rene@mini:~$ LD_LIBRARY_PATH="/usr/lib/gcc-snapshot/lib" gdb /usr/lib/openoffice/program/soffice.bin GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu"...
(gdb) run
Starting program: /usr/lib/openoffice/program/soffice.bin [Thread debugging using libthread_db enabled]
warning: Lowest section in /usr/lib/libicudata.so.38 is .hash at 000000b4
[New Thread 0x48054c60 (LWP 30793)]
[New Thread 0x4ba294c0 (LWP 30820)]
[New Thread 0x4c2294c0 (LWP 30821)]
[New Thread 0x4ca864c0 (LWP 30823)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x48054c60 (LWP 30793)]
0x0bb633b0 in deleteException ()
   from /usr/lib/openoffice/program/libgcc3_uno.so
(gdb)
Seems to be arch-indep (seen on i386 and ppc at least)

Unless this is a wrong behavior of OOo, the bug report can be safely closed.

Actually I am not sure. It night be a bug in OOo or it
might be one in gcc.

debian-gcc:

(gdb) bt
#0  0x0bb633b0 in deleteException ()
   from /usr/lib/openoffice/program/libgcc3_uno.so
#1  0x0e884a30 in ?? () from /usr/lib/gcc-snapshot/lib/libstdc++.so.6
#2  0x0e6af8f8 in _Unwind_DeleteException ()
   from /usr/lib/gcc-snapshot/lib/libgcc_s.so.1
#3  0x0e882d10 in __cxa_end_catch ()
   from /usr/lib/gcc-snapshot/lib/libstdc++.so.6
#4  0x0f739e00 in UCBOpenContentSync ()
   from /usr/lib/openoffice/program/libutl680lp.so
#5  0x0f73b4a8 in utl::UcbLockBytes::CreateLockBytes ()
   from /usr/lib/openoffice/program/libutl680lp.so
#6  0x0f746594 in lcl_CreateStream ()
   from /usr/lib/openoffice/program/libutl680lp.so
#7  0x0f74691c in utl::UcbStreamHelper::CreateStream ()
   from /usr/lib/openoffice/program/libutl680lp.so
#8  0x0ebdab38 in SfxApplication::GetDisabledSlotList_Impl ()
   from /usr/lib/openoffice/program/libsfx680lp.so
#9  0x0ecfb320 in SfxDispatcher::Construct_Impl ()
   from /usr/lib/openoffice/program/libsfx680lp.so
#10 0x0ecfb598 in SfxDispatcher ()
   from /usr/lib/openoffice/program/libsfx680lp.so
#11 0x0ebd7e54 in SfxApplication::Initialize_Impl ()
   from /usr/lib/openoffice/program/libsfx680lp.so
#12 0x0ebcf834 in SfxApplication::GetOrCreate ()
   from /usr/lib/openoffice/program/libsfx680lp.so
#13 0x0ed1a86c in SfxGlobalEvents_Impl ()
   from /usr/lib/openoffice/program/libsfx680lp.so
#14 0x0ed1aa5c in SfxGlobalEvents_Impl::impl_createInstance ()
   from /usr/lib/openoffice/program/libsfx680lp.so
#15 0x0f39991c in cppu::OSingleFactoryHelper::createInstanceEveryTime ()
   from /usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#16 0x0f3989fc in cppu::OSingleFactoryHelper::createInstanceWithContext ()
   from /usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#17 0x0f398d68 in cppu::OFactoryComponentHelper::createInstanceWithContext ()
   from /usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#18 0x0f39a6f8 in cppu::ORegistryFactoryHelper::createInstanceEveryTime ()
   from /usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#19 0x0f3989fc in cppu::OSingleFactoryHelper::createInstanceWithContext ()
   from /usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#20 0x0f398dcc in cppu::OFactoryComponentHelper::createInstanceWithContext ()
   from /usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#21 0x0bad63a8 in stoc_smgr::OServiceManager::createInstanceWithContext ()
   from /usr/lib/openoffice/program/bootstrap.uno.so
#22 0x0bad5004 in stoc_smgr::OServiceManager::createInstance ()
   from /usr/lib/openoffice/program/bootstrap.uno.so
#23 0x10031354 in desktop::Desktop::Main ()
#24 0x0fd3e180 in ImplSVMain () from /usr/lib/openoffice/program/libvcl680lp.so
#25 0x0fd3e37c in SVMain () from /usr/lib/openoffice/program/libvcl680lp.so
#26 0x10026fec in main ()
(gdb)

dev@udk / debian-gcc: Any ideas?

I apologize for the inconvenience.

Np. I will keep this bug open and retitle it until we are sure who is at
fault and reassign as appropriate if needed.

Grüße/Regards,

René


Reply to: