Apache OpenOffice (AOO) Bugzilla – Issue 16582
Linux sparc cpp_uno bridges crashes when not compiled with debug
Last modified: 2004-02-07 10:09:29 UTC
Hi, the linux sparc uno bridge crashes in case the bridge is not compiled with debug information. The crash occurs, when a c++ exception shall be caught. This is known from other c++ bridge implementations (for other platforms) and can be fixed with the attached patch. One can verify the crash/fix by starting the testcppu program, which gets built in test/cppu. The reason why this is necessary was that the compiler does some optimization, when there is no function call which may throw an exception (however the assembler code will do so in our case). When you build with debug=t, the OSL_ENSURE expand to some function calls, so the compiler does not perform this optimization. However, without the debug=t flag, there is no function call anymore and the compiler does the optimization. You can e.g. have a look at the gcc3_linux_intel binding, there you find the same fix.
Created attachment 7483 [details] patch to fix the crash during exception handling
Should definitly be fixed for OOo1.1, it e.g. affects interprocess bridge, starbasic, pyuno, etc.
E.g. sparcmoz@openoffice.org can verify the patch.
reassign for verification
I am not sure what is required, i did this test suggested by Joerg. I have build with 11rc2. Hope this helps. Please tell me if soemthing else is needed. I start with the patch since that is already in my build. build bridges with the patch jim@sun:/usr/local/oo_src/cppu/unxlngs.pro/bin$ ./testcppu > invocation test succeeded! > exception test succeeded! > C++-UNO test (c++ <-> uno <-> c++ [component impl]) succeeded! jim@sun:/usr/local/oo_src/cppu/unxlngs.pro/bin$ build bridges without the patch jim@sun:/usr/local/oo_src/cppu/unxlngs.pro/bin$ ./testcppu Aborted jim@sun:/usr/local/oo_src/cppu/unxlngs.pro/bin$ build bridges with the patch again jim@sun:/usr/local/oo_src/cppu/unxlngs.pro/bin$ ./testcppu > invocation test succeeded! > exception test succeeded! > C++-UNO test (c++ <-> uno <-> c++ [component impl]) succeeded! jim@sun:/usr/local/oo_src/cppu/unxlngs.pro/bin$ jim@sun:/usr/local/oo_src/cppu/unxlngs.pro/bin$ uname -a Linux sun 2.4.18 #1 SMP Mon Jan 27 14:07:39 EST 2003 sparc64 GNU/Linux jim@sun:/usr/local/oo_src/cppu/CVS$ cat Repository udk/cppu jim@sun:/usr/local/oo_src/cppu/CVS$ cat Root :pserver:sparcmoz@localhost:/cvs jim@sun:/usr/local/oo_src/cppu/CVS$ cat Tag Tcws_srx645_ooo11rc2 jim@sun:/usr/local/oo_src/cppu/CVS$
verified
so it is fixed now.
Hi, Sander, could you help by getting this one committed too, it is only for sparc linux
This never actually got committed
Comitted to rc3 /cvs/udk/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx,v <-- uno2cpp.cxx new revision: 1.2.24.1; previous revision: 1.2
thanx
mark as verified.
close issue.