#89 exc_server crash

Unix (35)

I've recenctly tried to build SheepShaver for MacOSX 10.5, on both ppc and x86 machines.
The PowerPC version - with symbols stripped or unstripped - works fine, the unstripped x86 version works fine, but the stripped x86 version crashes immediately.
I could track down the problem to the first call of the exc_server() function.
I modified the configure script to strip the "conftest$ac_exeext" test program after its build when it checks for Mach exceptions support, and now, the ./configure script produces the same error, i.e. the tiny conftest program is aborted when it calls exc_server(), producing the following crash log:

Process: conftest [39055]
Path: ./conftest
Identifier: conftest
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: sh [39054]

Date/Time: 2008-10-18 22:07:40.643 +0200
OS Version: Mac OS X 10.5.5 (9F33)
Report Version: 6

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 1

Thread 0:
0 conftest 0x00002b76 main + 246 (sigsegv.cpp:3386)
1 conftest 0x00001d56 0x1000 + 3414

Thread 1 Crashed:
0 libSystem.B.dylib 0x928eadbe __semwait_signal_nocancel + 10
1 libSystem.B.dylib 0x928dcc87 usleep$NOCANCEL$UNIX2003 + 61
2 libSystem.B.dylib 0x928fe48b abort + 85
3 libSystem.B.dylib 0x928d1007 internal_catch_exception_raise + 118
4 libSystem.B.dylib 0x928bf7b0 _Xexception_raise + 250
5 libSystem.B.dylib 0x928bf683 exc_server + 117
6 conftest 0x00001faf handleExceptions + 47 (sigsegv.cpp:794)
7 libSystem.B.dylib 0x9283a6f5 _pthread_start + 321
8 libSystem.B.dylib 0x9283a5b2 thread_start + 34

Thread 1 crashed with X86 Thread State (32-bit):
eax: 0x0000003c ebx: 0x928ea90f ecx: 0xb0080dcc edx: 0x928eadbe
edi: 0x000036c4 esi: 0xb0080e28 ebp: 0xb0080e08 esp: 0xb0080dcc
ss: 0x0000001f efl: 0x00000247 eip: 0x928eadbe cs: 0x00000007
ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037
cr2: 0x0000907b

Do you have any idea on why exc_server() would call abort() with a stripped down x86 executable ?


- Jean-Pierre.


  • Jean-Pierre Stierlin

    You can close this bug, I found the reason and the fix.
    For some reason, the x86 version of the internal_catch_exception_raise() function searches the exception callback by its name using the dynamic loader, which fails with an abort() call on a striped down executable.
    I've added a filter to the strip command in order to just let the _catch_exception_raise appear in the symbol names, and all went fine.


    - Jean-Pierre.

  • Jean-Pierre Stierlin

    • status: open --> closed-fixed

Log in to post a comment.