[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
App compiled with -fobjc-arc is crashsing in SparseArrayLookup when disp
From: |
Filipp Zhinkin |
Subject: |
App compiled with -fobjc-arc is crashsing in SparseArrayLookup when dispatch_group_t instance is created inside autorelease pool |
Date: |
Tue, 1 Dec 2015 19:32:55 +0300 |
Hi!
I'm trying to compile and run some ObjC 2.0 apps on ubuntu 12.04
x86_64 using clang-3.8 and latest gnustep-{make, base, libobjc2}
compiled from sources.
I've compiled everything except LLVM using instruction provided on
GNUstep wiki (http://wiki.gnustep.org/index.php/GNUstep_under_Ubuntu_Linux).
Unfortunately, when I'm trying to execute an app which simply creates
dispatch_group_t inside autoreleasepool it is crashing with following
stacktrace:
* thread #1: tid = 5851, 0x00007ffff7bc3c97
libobjc.so.4.6`SparseArrayLookup(sarray=0x00007ffff76915ba, index=7) +
103 at sarray2.h:75, name = 'a.out', stop reason = signal SIGSEGV:
invalid address (fault address: 0x0)
* frame #0: 0x00007ffff7bc3c97
libobjc.so.4.6`SparseArrayLookup(sarray=0x00007ffff76915ba, index=7) +
103 at sarray2.h:75
frame #1: 0x00007ffff7bc38ff
libobjc.so.4.6`objc_msg_lookup_internal(receiver=0x00007fffffffe3d0,
selector="\a", sender=0x0000000000000000) + 143 at sendmsg2.c:66
frame #2: 0x00007ffff7bc4577
libobjc.so.4.6`objc_msg_lookup(receiver=0x000000000060ffe0,
selector="\a") + 71 at sendmsg2.c:398
frame #3: 0x00007ffff7bc5eec
libobjc.so.4.6`release(obj=0x000000000060ffe0) + 300 at arc.m:216
frame #4: 0x00007ffff7bc62b8
libobjc.so.4.6`objc_release(obj=0x000000000060ffe0) + 40 at arc.m:454
frame #5: 0x00007ffff7bc62fc
libobjc.so.4.6`objc_storeStrong(addr=0x00007fffffffe4a8,
value=0x0000000000000000) + 60 at arc.m:462
frame #6: 0x0000000000400991 a.out`foo + 33 at test.m:6
frame #7: 0x00000000004009c4 a.out`main(argc=1,
argv=0x00007fffffffe5c8) + 36 at test.m:10
frame #8: 0x00007ffff670176d libc.so.6`__libc_start_main + 237
frame #9: 0x0000000000400879 a.out
I've tried to find out a root cause, but without any luck.
Does anyone know how to deal with that crash?
Thanks in advance,
Filipp.
Test's source code:
#import <Foundation/Foundation.h>
#import <dispatch/dispatch.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
dispatch_group_t group = dispatch_group_create();
}
return 0;
}
Compilation command:
clang-3.8 -g -x objective-c test.m `gnustep-config --objc-flags`
`gnustep-config --objc-libs` -ldispatch -lgnustep-base -fobjc-arc
Where
$ gnustep-config --objc-flags
-MMD -MP -D_FORTIFY_SOURCE=2 -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1
-DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing
-fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS
-fobjc-nonfragile-abi -D_NONFRAGILE_ABI -pthread -fPIC -DDEBUG
-fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
-fgnu-runtime -fconstant-string-class=NSConstantString -I.
-I/root/GNUstep/Library/Headers -I/usr/local/include
$ gnustep-config --objc-libs
-rdynamic -Wl,-Bsymbolic-functions -Wl,-z,relro -pthread -fexceptions
-fobjc-nonfragile-abi -fgnu-runtime -L/root/GNUstep/Library/Libraries
-L/usr/local/lib -lobjc -lm
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- App compiled with -fobjc-arc is crashsing in SparseArrayLookup when dispatch_group_t instance is created inside autorelease pool,
Filipp Zhinkin <=