I'm having an odd crash in Boehm on Android x86 (but arm works fine); It's crashing on:
deferred = *(word *)limit;
with:
LogCat: I/DEBUG ( 6453): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa31f8
It's always the same address (0xa31f8) it fails at; Now this is probably something I'm doing wrong. This is a custom language and I'm just linking to libc.so. What could possibly cause this?
Log:
LogCat: I/BDWGC ( 7930): Grow heap to 64 KiB after 0 bytes allocated
LogCat: D/BDWGC ( 7930): Creating thread 0xb7795160
LogCat: D/BDWGC ( 7930): Stopping the world from 0xb7795160
LogCat: D/BDWGC ( 7930): World stopped from 0xb7795160
LogCat: D/BDWGC ( 7930): Pushing stacks from thread 0xb7795160
LogCat: D/BDWGC ( 7930): Stack for thread 0xb7795160 = [0xbf90be1c,0xbf90f000) LogCat: F/libc ( 7930): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xa31f8 in tid 7930 (ksample.oxygene)
Backtrace:
(gdb) bt
#0 0xa502c9ad in GC_mark_from (mark_stack_top=0xb8b30010, mark_stack=0xb8b30000, mark_stack_limit=0xb8b38000) at mark.c:853
#1 0xa502c1d0 in GC_mark_some (cold_gc_frame=0xbf90beec "l¿\220¿Hò\001¥ì¾\220¿") at mark.c:409
#2 0xa501f248 in GC_stopped_mark (stop_func=0xa501e420 ) at alloc.c:702
#3 0xa501eed2 in GC_try_to_collect_inner (stop_func=0xa501e420 ) at alloc.c:488
#4 0xa50254ff in GC_init () at misc.c:1288
There was a bug in boehm-gc for Android causing registration of a data root with an unmapped memory region (thus resulting in a SIGSEGV/SEGV_MAPERR during GC initialization). Now it is fixed.