Issue 16582 - Linux sparc cpp_uno bridges crashes when not compiled with debug
Summary: Linux sparc cpp_uno bridges crashes when not compiled with debug
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 RC
Hardware: PC Linux, all
: P2 Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: Martin Hollmichel
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks: 17420
  Show dependency tree
 
Reported: 2003-07-08 21:29 UTC by joergbudi
Modified: 2004-02-07 10:09 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch to fix the crash during exception handling (1.03 KB, patch)
2003-07-08 21:31 UTC, joergbudi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description joergbudi 2003-07-08 21:29:07 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.
Comment 1 joergbudi 2003-07-08 21:31:03 UTC
Created attachment 7483 [details]
patch to fix the crash during exception handling
Comment 2 joergbudi 2003-07-08 21:32:27 UTC
Should definitly be fixed for OOo1.1, it e.g. affects interprocess
bridge, starbasic, pyuno, etc.
Comment 3 joergbudi 2003-07-08 21:34:21 UTC
E.g. sparcmoz@openoffice.org can verify the patch.
Comment 4 Martin Hollmichel 2003-07-09 10:14:46 UTC
reassign for verification
Comment 5 sparcmoz 2003-07-12 01:39:49 UTC
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$
Comment 6 sparcmoz 2003-07-15 09:38:23 UTC
verified
Comment 7 Martin Hollmichel 2003-07-15 09:47:02 UTC
so it is fixed now.
Comment 8 sparcmoz 2003-07-30 22:59:00 UTC
Hi, Sander, could you help by getting this one committed too, it is
only for sparc linux
Comment 9 chris 2003-08-04 15:59:00 UTC
This never actually got committed
Comment 10 chris 2003-08-04 16:01:13 UTC
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
Comment 11 sander_traveling 2003-08-05 00:32:14 UTC
thanx
Comment 12 Martin Hollmichel 2004-02-07 10:07:30 UTC
mark as verified.
Comment 13 Martin Hollmichel 2004-02-07 10:09:29 UTC
close issue.