exceptions pulling an Abort Trap

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

exceptions pulling an Abort Trap

Riccardo Mottola-5
Hi,

I have a strange issue on FreeBSD. I am running gnustep git head.

Ít is compiled with gcc7. I  am actually unsure which runtime is being used. I have libobjc2 installed as a package, I don't know if gnustep picks up that one or uses gcc's one.

I suppose though yes, this is the ldd of base:

$ ldd /System/Library/Libraries/libgnustep-base.so
/System/Library/Libraries/libgnustep-base.so:
        libobjc.so.4.6 => /usr/local/lib/libobjc.so.4.6 (0x28600000)
        libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x28625000)
        libavahi-common.so.3 => /usr/local/lib/libavahi-common.so.3 (0x281e1000)
        libavahi-client.so.3 => /usr/local/lib/libavahi-client.so.3 (0x281ec000)
        libgnutls.so.30 => /usr/local/lib/libgnutls.so.30 (0x2867d000)
        libxslt.so.1 => /usr/local/lib/libxslt.so.1 (0x287b6000)
        libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x28d88000)
        libz.so.6 => /lib/libz.so.6 (0x28edb000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x28ef1000)
        libm.so.5 => /lib/libm.so.5 (0x28f17000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x28f3f000)
        libffi.so.6 => /usr/local/lib/libffi.so.6 (0x287eb000)
        libkvm.so.7 => /lib/libkvm.so.7 (0x287f2000)
        librt.so.1 => /usr/lib/librt.so.1 (0x281fa000)
        libthr.so.3 => /lib/libthr.so.3 (0x29034000)
        libicui18n.so.61 => /usr/local/lib/libicui18n.so.61 (0x29057000)
        libicuuc.so.61 => /usr/local/lib/libicuuc.so.61 (0x29313000)
        libicudata.so.61 => /usr/local/lib/libicudata.so.61 (0x294ae000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x294b0000)
        libc.so.7 => /lib/libc.so.7 (0x28071000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x294bc000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x294d5000)
        libdbus-1.so.3 => /usr/local/lib/libdbus-1.so.3 (0x294de000)
        libp11-kit.so.0 => /usr/local/lib/libp11-kit.so.0 (0x2951f000)
        libunistring.so.2 => /usr/local/lib/libunistring.so.2 (0x295f0000)
        libtasn1.so.6 => /usr/local/lib/libtasn1.so.6 (0x2977a000)
        libnettle.so.6 => /usr/local/lib/libnettle.so.6 (0x2978b000)
        libhogweed.so.4 => /usr/local/lib/libhogweed.so.4 (0x297be000)
        libidn2.so.0 => /usr/local/lib/libidn2.so.0 (0x297eb000)
        libelf.so.2 => /lib/libelf.so.2 (0x29807000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x2981d000)
        libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x298db000)


now, applications are unstable, the get abort trap often and I think this is everytime an exception occours. This is the stacktrace of an examplle, but  it is always with raise/throg.

Program received signal SIGABRT, Aborted.
0x2823a42f in thr_kill () from /lib/libc.so.7

(gdb) bt
#0  0x2823a42f in thr_kill () from /lib/libc.so.7
#1  0x2823a40b in raise () from /lib/libc.so.7
#2  0x2823a36f in abort () from /lib/libc.so.7
#3  0x2812237f in objc_exception_throw () from /usr/local/lib/libobjc.so.4.6
#4  0x28d55fcd in -[NSException raise] (self=0x2a262fe4, _cmd=0x2810d1e8 <_OBJC_SELECTOR_TABLE+872>) at NSException.m:1511
#5  0x280e90e7 in -[DBSoap login::::] (self=<optimized out>, _cmd=<optimized out>, url=<optimized out>, userName=<optimized out>,
    password=<optimized out>, useHttps=<optimized out>) at DBSoap.m:1262
#6  0x0804c786 in -[AppController doLogin:] (self=<optimized out>, _cmd=<optimized out>, sender=<optimized out>) at AppController.m:295
#7  0x284d3878 in -[NSApplication sendAction:to:from:] (self=0x2a0a88c4, _cmd=0x28888358 <_OBJC_SELECTOR_TABLE+664>, aSelector=0x2a1157f8,
    aTarget=0x2a21c284, sender=0x2a022c84) at NSApplication.m:2250
#8  0x28530e3e in -[NSControl sendAction:to:] (self=0x2a022c84, _cmd=0x28876238 <_OBJC_SELECTOR_TABLE+696>, theAction=0x2a1157f8,
    theTarget=0x2a21c284) at NSControl.m:760
#9  0x2850bde1 in -[NSCell _sendActionFrom:] (self=0x2c483984, _cmd=0x28876290 <_OBJC_SELECTOR_TABLE+784>, sender=0x2a022c84)
    at NSCell.m:1451
#10 0x28507c43 in -[NSButtonCell performClickWithFrame:inView:] (self=0x2c483984, _cmd=0x28888390 <_OBJC_SELECTOR_TABLE+720>,
    cellFrame=..., controlView=0x2a022c84) at NSButtonCell.m:1590
#11 0x285311bb in -[NSControl performClick:] (self=0x2a022c84, _cmd=0x28870008 <_OBJC_SELECTOR_TABLE+392>, sender=0x2a022c84)
    at NSControl.m:858
#12 0x28504cbc in -[NSButton performKeyEquivalent:] (self=0x2a022c84, _cmd=0x289188f8 <_OBJC_SELECTOR_TABLE+2488>, anEvent=0x2c86d964)
    at NSButton.m:528
#13 0x28632c1b in -[NSView performKeyEquivalent:] (self=0x2a022984, _cmd=0x289200a0 <_OBJC_SELECTOR_TABLE+3104>, theEvent=0x2c86d964)
    at NSView.m:3490
#14 0x284d63a9 in -[NSApplication sendEvent:] (self=0x2a0a88c4, _cmd=0x2885f1f8 <_OBJC_SELECTOR_TABLE+2232>, theEvent=0x2c86d964)
    at NSApplication.m:2096
#15 0x284d9931 in -[NSApplication run] (self=<optimized out>, _cmd=<optimized out>) at NSApplication.m:1562
#16 0x284bb9ac in NSApplicationMain (argc=1, argv=0xbfbfe640) at Functions.m:91
#17 0x08049477 in main (argc=1, argv=0xbfbfe640) at main.m:30

can it be that libobjc2 is incompatible with gcc if not compiled with it? or that base configure got confused?
Can I instruct gnustep to use gcc's runtime even if libobjc2 is present, as a "test" ?

I configured make with:
$ ./configure --prefix=/ --with-layout=gnustep CC=gcc7 CXX=g++7 CPP=cpp7

and base with no additional parameters.

configure says:
configure:5987: checking the Objective-C runtime
configure:5997: result: GNU
configure:6014: checking for custom shared objc library
configure:6073: result: NONE


but it will say GNU for both gcc's and David's runtime, right?

Actually, I fear that FreeBSD ships only libobj2 and that gcc7 is without objc runtime somehow.. it is strange, I find only one libobjc.so...

Thanks,

Riccardo


_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: exceptions pulling an Abort Trap

Riccardo Mottola-5
Hi all,

nobody has a hint?

I am suspecting that if libobjc2 of FreeBSD was compiled with clang
(which surely is) it won't work with GCC. It is very strange I did not
find GCC's runtime library though.

Or maybe the problem is totally different?

Riccardo

Riccardo Mottola wrote:

> Hi,
>
> I have a strange issue on FreeBSD. I am running gnustep git head.
>
> Ít is compiled with gcc7. I  am actually unsure which runtime is being used. I have libobjc2 installed as a package, I don't know if gnustep picks up that one or uses gcc's one.
>
> I suppose though yes, this is the ldd of base:
>
> $ ldd /System/Library/Libraries/libgnustep-base.so
> /System/Library/Libraries/libgnustep-base.so:
>          libobjc.so.4.6 => /usr/local/lib/libobjc.so.4.6 (0x28600000)
>          libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x28625000)
>          libavahi-common.so.3 => /usr/local/lib/libavahi-common.so.3 (0x281e1000)
>          libavahi-client.so.3 => /usr/local/lib/libavahi-client.so.3 (0x281ec000)
>          libgnutls.so.30 => /usr/local/lib/libgnutls.so.30 (0x2867d000)
>          libxslt.so.1 => /usr/local/lib/libxslt.so.1 (0x287b6000)
>          libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x28d88000)
>          libz.so.6 => /lib/libz.so.6 (0x28edb000)
>          liblzma.so.5 => /usr/lib/liblzma.so.5 (0x28ef1000)
>          libm.so.5 => /lib/libm.so.5 (0x28f17000)
>          libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x28f3f000)
>          libffi.so.6 => /usr/local/lib/libffi.so.6 (0x287eb000)
>          libkvm.so.7 => /lib/libkvm.so.7 (0x287f2000)
>          librt.so.1 => /usr/lib/librt.so.1 (0x281fa000)
>          libthr.so.3 => /lib/libthr.so.3 (0x29034000)
>          libicui18n.so.61 => /usr/local/lib/libicui18n.so.61 (0x29057000)
>          libicuuc.so.61 => /usr/local/lib/libicuuc.so.61 (0x29313000)
>          libicudata.so.61 => /usr/local/lib/libicudata.so.61 (0x294ae000)
>          libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x294b0000)
>          libc.so.7 => /lib/libc.so.7 (0x28071000)
>          libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x294bc000)
>          libintl.so.8 => /usr/local/lib/libintl.so.8 (0x294d5000)
>          libdbus-1.so.3 => /usr/local/lib/libdbus-1.so.3 (0x294de000)
>          libp11-kit.so.0 => /usr/local/lib/libp11-kit.so.0 (0x2951f000)
>          libunistring.so.2 => /usr/local/lib/libunistring.so.2 (0x295f0000)
>          libtasn1.so.6 => /usr/local/lib/libtasn1.so.6 (0x2977a000)
>          libnettle.so.6 => /usr/local/lib/libnettle.so.6 (0x2978b000)
>          libhogweed.so.4 => /usr/local/lib/libhogweed.so.4 (0x297be000)
>          libidn2.so.0 => /usr/local/lib/libidn2.so.0 (0x297eb000)
>          libelf.so.2 => /lib/libelf.so.2 (0x29807000)
>          libc++.so.1 => /usr/lib/libc++.so.1 (0x2981d000)
>          libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x298db000)
>
>
> now, applications are unstable, the get abort trap often and I think this is everytime an exception occours. This is the stacktrace of an examplle, but  it is always with raise/throg.
>
> Program received signal SIGABRT, Aborted.
> 0x2823a42f in thr_kill () from /lib/libc.so.7
>
> (gdb) bt
> #0  0x2823a42f in thr_kill () from /lib/libc.so.7
> #1  0x2823a40b in raise () from /lib/libc.so.7
> #2  0x2823a36f in abort () from /lib/libc.so.7
> #3  0x2812237f in objc_exception_throw () from /usr/local/lib/libobjc.so.4.6
> #4  0x28d55fcd in -[NSException raise] (self=0x2a262fe4, _cmd=0x2810d1e8 <_OBJC_SELECTOR_TABLE+872>) at NSException.m:1511
> #5  0x280e90e7 in -[DBSoap login::::] (self=<optimized out>, _cmd=<optimized out>, url=<optimized out>, userName=<optimized out>,
>      password=<optimized out>, useHttps=<optimized out>) at DBSoap.m:1262
> #6  0x0804c786 in -[AppController doLogin:] (self=<optimized out>, _cmd=<optimized out>, sender=<optimized out>) at AppController.m:295
> #7  0x284d3878 in -[NSApplication sendAction:to:from:] (self=0x2a0a88c4, _cmd=0x28888358 <_OBJC_SELECTOR_TABLE+664>, aSelector=0x2a1157f8,
>      aTarget=0x2a21c284, sender=0x2a022c84) at NSApplication.m:2250
> #8  0x28530e3e in -[NSControl sendAction:to:] (self=0x2a022c84, _cmd=0x28876238 <_OBJC_SELECTOR_TABLE+696>, theAction=0x2a1157f8,
>      theTarget=0x2a21c284) at NSControl.m:760
> #9  0x2850bde1 in -[NSCell _sendActionFrom:] (self=0x2c483984, _cmd=0x28876290 <_OBJC_SELECTOR_TABLE+784>, sender=0x2a022c84)
>      at NSCell.m:1451
> #10 0x28507c43 in -[NSButtonCell performClickWithFrame:inView:] (self=0x2c483984, _cmd=0x28888390 <_OBJC_SELECTOR_TABLE+720>,
>      cellFrame=..., controlView=0x2a022c84) at NSButtonCell.m:1590
> #11 0x285311bb in -[NSControl performClick:] (self=0x2a022c84, _cmd=0x28870008 <_OBJC_SELECTOR_TABLE+392>, sender=0x2a022c84)
>      at NSControl.m:858
> #12 0x28504cbc in -[NSButton performKeyEquivalent:] (self=0x2a022c84, _cmd=0x289188f8 <_OBJC_SELECTOR_TABLE+2488>, anEvent=0x2c86d964)
>      at NSButton.m:528
> #13 0x28632c1b in -[NSView performKeyEquivalent:] (self=0x2a022984, _cmd=0x289200a0 <_OBJC_SELECTOR_TABLE+3104>, theEvent=0x2c86d964)
>      at NSView.m:3490
> #14 0x284d63a9 in -[NSApplication sendEvent:] (self=0x2a0a88c4, _cmd=0x2885f1f8 <_OBJC_SELECTOR_TABLE+2232>, theEvent=0x2c86d964)
>      at NSApplication.m:2096
> #15 0x284d9931 in -[NSApplication run] (self=<optimized out>, _cmd=<optimized out>) at NSApplication.m:1562
> #16 0x284bb9ac in NSApplicationMain (argc=1, argv=0xbfbfe640) at Functions.m:91
> #17 0x08049477 in main (argc=1, argv=0xbfbfe640) at main.m:30
>
> can it be that libobjc2 is incompatible with gcc if not compiled with it? or that base configure got confused?
> Can I instruct gnustep to use gcc's runtime even if libobjc2 is present, as a "test" ?
>
> I configured make with:
> $ ./configure --prefix=/ --with-layout=gnustep CC=gcc7 CXX=g++7 CPP=cpp7
>
> and base with no additional parameters.
>
> configure says:
> configure:5987: checking the Objective-C runtime
> configure:5997: result: GNU
> configure:6014: checking for custom shared objc library
> configure:6073: result: NONE
>
>
> but it will say GNU for both gcc's and David's runtime, right?
>
> Actually, I fear that FreeBSD ships only libobj2 and that gcc7 is without objc runtime somehow.. it is strange, I find only one libobjc.so...
>
> Thanks,
>
> Riccardo
>


_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: exceptions pulling an Abort Trap

David Chisnall-7
Hi Riccardo,

This looks like what happens if you have no @catch block anywhere on the stack.  If you can recompile the runtime, try sticking #define DEBUG_EXCEPTIONS in eh_personality.c - it will report where failures are happening.

David

> On 24 May 2018, at 10:34, Riccardo Mottola <[hidden email]> wrote:
>
> Hi all,
>
> nobody has a hint?
>
> I am suspecting that if libobjc2 of FreeBSD was compiled with clang (which surely is) it won't work with GCC. It is very strange I did not find GCC's runtime library though.
>
> Or maybe the problem is totally different?
>
> Riccardo
>
> Riccardo Mottola wrote:
>> Hi,
>>
>> I have a strange issue on FreeBSD. I am running gnustep git head.
>>
>> Ít is compiled with gcc7. I  am actually unsure which runtime is being used. I have libobjc2 installed as a package, I don't know if gnustep picks up that one or uses gcc's one.
>>
>> I suppose though yes, this is the ldd of base:
>>
>> $ ldd /System/Library/Libraries/libgnustep-base.so
>> /System/Library/Libraries/libgnustep-base.so:
>>         libobjc.so.4.6 => /usr/local/lib/libobjc.so.4.6 (0x28600000)
>>         libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x28625000)
>>         libavahi-common.so.3 => /usr/local/lib/libavahi-common.so.3 (0x281e1000)
>>         libavahi-client.so.3 => /usr/local/lib/libavahi-client.so.3 (0x281ec000)
>>         libgnutls.so.30 => /usr/local/lib/libgnutls.so.30 (0x2867d000)
>>         libxslt.so.1 => /usr/local/lib/libxslt.so.1 (0x287b6000)
>>         libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x28d88000)
>>         libz.so.6 => /lib/libz.so.6 (0x28edb000)
>>         liblzma.so.5 => /usr/lib/liblzma.so.5 (0x28ef1000)
>>         libm.so.5 => /lib/libm.so.5 (0x28f17000)
>>         libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x28f3f000)
>>         libffi.so.6 => /usr/local/lib/libffi.so.6 (0x287eb000)
>>         libkvm.so.7 => /lib/libkvm.so.7 (0x287f2000)
>>         librt.so.1 => /usr/lib/librt.so.1 (0x281fa000)
>>         libthr.so.3 => /lib/libthr.so.3 (0x29034000)
>>         libicui18n.so.61 => /usr/local/lib/libicui18n.so.61 (0x29057000)
>>         libicuuc.so.61 => /usr/local/lib/libicuuc.so.61 (0x29313000)
>>         libicudata.so.61 => /usr/local/lib/libicudata.so.61 (0x294ae000)
>>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x294b0000)
>>         libc.so.7 => /lib/libc.so.7 (0x28071000)
>>         libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x294bc000)
>>         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x294d5000)
>>         libdbus-1.so.3 => /usr/local/lib/libdbus-1.so.3 (0x294de000)
>>         libp11-kit.so.0 => /usr/local/lib/libp11-kit.so.0 (0x2951f000)
>>         libunistring.so.2 => /usr/local/lib/libunistring.so.2 (0x295f0000)
>>         libtasn1.so.6 => /usr/local/lib/libtasn1.so.6 (0x2977a000)
>>         libnettle.so.6 => /usr/local/lib/libnettle.so.6 (0x2978b000)
>>         libhogweed.so.4 => /usr/local/lib/libhogweed.so.4 (0x297be000)
>>         libidn2.so.0 => /usr/local/lib/libidn2.so.0 (0x297eb000)
>>         libelf.so.2 => /lib/libelf.so.2 (0x29807000)
>>         libc++.so.1 => /usr/lib/libc++.so.1 (0x2981d000)
>>         libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x298db000)
>>
>>
>> now, applications are unstable, the get abort trap often and I think this is everytime an exception occours. This is the stacktrace of an examplle, but  it is always with raise/throg.
>>
>> Program received signal SIGABRT, Aborted.
>> 0x2823a42f in thr_kill () from /lib/libc.so.7
>>
>> (gdb) bt
>> #0  0x2823a42f in thr_kill () from /lib/libc.so.7
>> #1  0x2823a40b in raise () from /lib/libc.so.7
>> #2  0x2823a36f in abort () from /lib/libc.so.7
>> #3  0x2812237f in objc_exception_throw () from /usr/local/lib/libobjc.so.4.6
>> #4  0x28d55fcd in -[NSException raise] (self=0x2a262fe4, _cmd=0x2810d1e8 <_OBJC_SELECTOR_TABLE+872>) at NSException.m:1511
>> #5  0x280e90e7 in -[DBSoap login::::] (self=<optimized out>, _cmd=<optimized out>, url=<optimized out>, userName=<optimized out>,
>>     password=<optimized out>, useHttps=<optimized out>) at DBSoap.m:1262
>> #6  0x0804c786 in -[AppController doLogin:] (self=<optimized out>, _cmd=<optimized out>, sender=<optimized out>) at AppController.m:295
>> #7  0x284d3878 in -[NSApplication sendAction:to:from:] (self=0x2a0a88c4, _cmd=0x28888358 <_OBJC_SELECTOR_TABLE+664>, aSelector=0x2a1157f8,
>>     aTarget=0x2a21c284, sender=0x2a022c84) at NSApplication.m:2250
>> #8  0x28530e3e in -[NSControl sendAction:to:] (self=0x2a022c84, _cmd=0x28876238 <_OBJC_SELECTOR_TABLE+696>, theAction=0x2a1157f8,
>>     theTarget=0x2a21c284) at NSControl.m:760
>> #9  0x2850bde1 in -[NSCell _sendActionFrom:] (self=0x2c483984, _cmd=0x28876290 <_OBJC_SELECTOR_TABLE+784>, sender=0x2a022c84)
>>     at NSCell.m:1451
>> #10 0x28507c43 in -[NSButtonCell performClickWithFrame:inView:] (self=0x2c483984, _cmd=0x28888390 <_OBJC_SELECTOR_TABLE+720>,
>>     cellFrame=..., controlView=0x2a022c84) at NSButtonCell.m:1590
>> #11 0x285311bb in -[NSControl performClick:] (self=0x2a022c84, _cmd=0x28870008 <_OBJC_SELECTOR_TABLE+392>, sender=0x2a022c84)
>>     at NSControl.m:858
>> #12 0x28504cbc in -[NSButton performKeyEquivalent:] (self=0x2a022c84, _cmd=0x289188f8 <_OBJC_SELECTOR_TABLE+2488>, anEvent=0x2c86d964)
>>     at NSButton.m:528
>> #13 0x28632c1b in -[NSView performKeyEquivalent:] (self=0x2a022984, _cmd=0x289200a0 <_OBJC_SELECTOR_TABLE+3104>, theEvent=0x2c86d964)
>>     at NSView.m:3490
>> #14 0x284d63a9 in -[NSApplication sendEvent:] (self=0x2a0a88c4, _cmd=0x2885f1f8 <_OBJC_SELECTOR_TABLE+2232>, theEvent=0x2c86d964)
>>     at NSApplication.m:2096
>> #15 0x284d9931 in -[NSApplication run] (self=<optimized out>, _cmd=<optimized out>) at NSApplication.m:1562
>> #16 0x284bb9ac in NSApplicationMain (argc=1, argv=0xbfbfe640) at Functions.m:91
>> #17 0x08049477 in main (argc=1, argv=0xbfbfe640) at main.m:30
>>
>> can it be that libobjc2 is incompatible with gcc if not compiled with it? or that base configure got confused?
>> Can I instruct gnustep to use gcc's runtime even if libobjc2 is present, as a "test" ?
>>
>> I configured make with:
>> $ ./configure --prefix=/ --with-layout=gnustep CC=gcc7 CXX=g++7 CPP=cpp7
>>
>> and base with no additional parameters.
>>
>> configure says:
>> configure:5987: checking the Objective-C runtime
>> configure:5997: result: GNU
>> configure:6014: checking for custom shared objc library
>> configure:6073: result: NONE
>>
>>
>> but it will say GNU for both gcc's and David's runtime, right?
>>
>> Actually, I fear that FreeBSD ships only libobj2 and that gcc7 is without objc runtime somehow.. it is strange, I find only one libobjc.so...
>>
>> Thanks,
>>
>> Riccardo
>>
>
>
> _______________________________________________
> Gnustep-dev mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/gnustep-dev
>


_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: exceptions pulling an Abort Trap

Riccardo Mottola-5
Hi David,

On 2018-05-24 12:44:21 +0000 David Chisnall
<[hidden email]> wrote:

> Hi Riccardo,
>
> This looks like what happens if you have no @catch block anywhere on
> the
> stack.  If you can recompile the runtime, try sticking #define
> DEBUG_EXCEPTIONS in eh_personality.c - it will report where failures
> are
> happening.

thanks for the hint. First, let me specify that the libobjc2 I had
installed was the binary package provided by FreeBSD. The platform is
x86

Second, I noticed that I need libobjc2 package, if i remove it,
gnustep base does not find any runtime with GCC7. Could it be that the
gcc provided by FreeBSD packages contains language support but no
runtime with the intent to have a single runtime for everything (which
would be yours)?
Indeed I did not find any other libobjc.so in /usr/local

I tried building libobjc2 from our github repo sources (I did not yet
modivy eh_personality.c, tried a stock compilation), but i fails this
way:

Scanning dependencies of target CXXExceptions
[ 12%] Building C object
Test/CMakeFiles/CXXExceptions.dir/CXXException.m.o
cc: error: unable to execute command: Segmentation fault (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see
invocation)
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on
LLVM 4.0.0)
Target: i386-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin
cc: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.freebsd.org/submit/ and include the crash backtrace,
preprocessed source, and associated run script.
cc: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/ForwardDeclareProtocol-f61ec1.m
cc: note: diagnostic msg: /tmp/ForwardDeclareProtocol-f61ec1.sh
cc: note: diagnostic msg:


If I run make again, it will continue, but fail repeatably in other
places:
[ 11%] Built target ObjCXXEHInterop
[ 11%] Building C object
Test/CMakeFiles/ForwardDeclareProtocolAccess.dir/ForwardDeclareProtocol.m.o
cc: error: unable to execute command: Segmentation fault (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see
invocation)
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on
LLVM 4.0.0)

this place looks repeatable, if I run make again and again.

A bit unexpected? Can I force it to build with gcc7 or another versin
of clang? Apparently packages are only for lder versions than 4.0:

bazel-clang38-0.11.0           Fast and correct build system
clang-devel-7.0.d20180327      C, Objective-C, and C++ compiler (use
devel/llvm-devel)
clang33-3.3_10                 C, Objective-C, and C++ compiler
clang34-3.4.2_8                C, Objective-C, and C++ compiler
clang35-3.5.2_4                C, Objective-C, and C++ compiler
clang38-3.8_1                  C, Objective-C, and C++ compiler (use
devel/llvm38)

Thanks,

Riccardo


_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: exceptions pulling an Abort Trap

Riccardo Mottola-5
In reply to this post by David Chisnall-7
Hi David,


David Chisnall wrote:
> This looks like what happens if you have no @catch block anywhere on the stack.  If you can recompile the runtime, try sticking #define DEBUG_EXCEPTIONS in eh_personality.c - it will report where failures are happening.

I updated and rebuilt with clang-devel (7.0)
Finally, this compiler completes build! I install but things do not work
better.

I rerun configure of gnustep-base and notice that the obj-c availability
test fails with this error:


| int main(int argc, char **argv) {
| pid_t t = syscall(SYS_gettid); return t == -1 ? 1 : 0; }
configure:7806: result: no
configure:7817: checking whether objc really works
configure:7837: gcc7 -o conftest -g -O2  -I/Local/Library/Headers
-I/Local/Library/Headers -I/System/Library/Headers -I/usr/local/include
-I/System/Library/Headers  -fgnu-runtime -x ob
jective-c  -shared-libgcc -L/Local/Library/Libraries
-L/Local/Library/Libraries -L/System/Library/Libraries -L/usr/local/lib
-L/System/Library/Libraries conftest.c -lrt -lpthread -rdy
namic -shared-libgcc -pthread -fexceptions -fgnu-runtime
-L/home/multix/GNUstep/Library/Libraries -L/Local/Library/Libraries
-L/System/Library/Libraries -L/usr/local/lib -lobjc -lm >&5
/System/Library/Libraries/libobjc.so: undefined reference to `__atomic_load'
collect2: error: ld returned 1 exit status
configure:7837: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""


This hints that libobjc.so is not properly linked or misses atomic_load
for some reason.

Riccardo

_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev