[Gc] trouble with gc-7.2d compiling against musl libc

John Spencer maillist-boehm at barfooze.de
Mon Jan 7 02:23:51 PST 2013


On 01/06/2013 03:34 PM, Ivan Maidanski wrote:
>   Hi John,
>
> Does single-threaded gc pass all tests? If no, it's better to fix the problem in the single-threaded gc first (--enable-threads=none).

i'm using your git repo (biting the bullet and installed libtool to make 
the autogen stuff happy ...)

CFLAGS="-DNO_SIGCONTEXT_H -DNO_GETCONTEXT" ./configure 
--enable-threads=none --enable-gc-assertions --prefix=

make -j9 && make check

make[2]: Entering directory `/root/GC/bdwgc'
Assertion failure: finalize.c:801
assertion failure
Aborted
FAIL: cordtest
Switched to incremental mode
Emulating dirty bits with mprotect/signals
Unexpected bus error or segmentation fault
Aborted
FAIL: gctest
Found 1 leaked objects:
0x1a18fe0 (tests/leak_test.c:12, sz=4, NORMAL)
Found 7 leaked objects:
0x1a19ee0 (tests/leak_test.c:19, sz=9, NORMAL)
0x1a19f20 (tests/leak_test.c:19, sz=10, NORMAL)
0x1a19f60 (tests/leak_test.c:19, sz=11, NORMAL)
0x1a19fa0 (tests/leak_test.c:19, sz=12, NORMAL)
0x1a18ef0 (tests/leak_test.c:19, sz=8, NORMAL)
0x1a18f80 (tests/leak_test.c:19, sz=6, NORMAL)
0x1a18fb0 (tests/leak_test.c:19, sz=7, NORMAL)
PASS: leaktest
Final heap size is 65536
PASS: middletest
GC_check_heap_block: found 1 smashed heap objects:
  0xc65fe8 in or near object at 0xc65fc0 (tests/smash_test.c:22, sz=40)
GC_check_heap_block: found 1 smashed heap objects:
  0xc65fe8 in or near object at 0xc65fc0 (tests/smash_test.c:22, sz=40)
GC_check_heap_block: found 1 smashed heap objects:
  0xc65fe8 in or near object at 0xc65fc0 (tests/smash_test.c:22, sz=40)
GC_check_heap_block: found 2 smashed heap objects:
  0xcd4a98 in or near object at 0xcd4a70 (tests/smash_test.c:22, sz=40)
  0xc65fe8 in or near object at 0xc65fc0 (tests/smash_test.c:22, sz=40)
GC_check_heap_block: found 2 smashed heap objects:
  0xcd4a98 in or near object at 0xcd4a70 (tests/smash_test.c:22, sz=40)
  0xc65fe8 in or near object at 0xc65fc0 (tests/smash_test.c:22, sz=40)
PASS: smashtest
PASS: hugetest
Heap size: 65536
PASS: realloc_test
PASS: staticrootstest
Unthreaded disclaim test.
PASS: disclaim_test
                         fin. ratio       time/s    time/fin.
Segmentation fault
FAIL: disclaim_bench
====================================
3 of 10 tests failed
Please report to gc at linux.hpl.hp.com
====================================


>
> Also, please check GC assertion checking on (--enable-gc-assertions).
>
> Воскресенье,  6 января 2013, 13:00 +01:00 от John Spencer<maillist-boehm at barfooze.de>:
>> Hi Ivan,
>>
>> On 01/06/2013 11:30 AM, Ivan Maidanski wrote:
>>
>>> Use -DNO_SIGCONTEXT_H instead (I've added this macro recognition to master branch for now).
>>> I don't know whether we still need inclusion of sigcontext.h for any target.
>>>
>>
>> thanks, i will try.

this does not work:
gcc -fexceptions -Wall -Wextra -DNO_SIGCONTEXT_H -fno-strict-aliasing -o 
.libs/cordtest cordtest.o  ./.libs/libgc.so ./.libs/libcord.so 
/root/GC/bdwgc/.libs/libgc.so -ldl
./.libs/libgc.so: undefined reference to `getcontext'

it still needs -DNO_GETCONTEXT in order to make that missing ref go away.


>>
>>> which algorithm is used for detection of main stack base in your case? which macro is defined - STACKBOTTOM, HEURISTIC1, LINUX_STACKBOTTOM?
>>
>> out of these 3, only LINUX_STACKBOTTOM seems to be defined (i added
>> #warnings into os_dep.c in order to find out)
> Seems to be correct.
> Does GC_get_main_stack_base return reasonable value?

how can i check ?

>>
>>>> in any case, i'd welcome advice on how to workaround this issue, so that
>>>> i get a working libgc.so in order to use inkscape.
>>> Thanks for reporting the problem, I'll definitely fix the gc source if we understand how to do it correctly. (Typically, first I apply the fixes to master branch and, then, cherry-pick to 7.2 release.)
>>
>> thank you. is there anything else i can help with in order to get this
>> fixed ?
> Also, static data roots should be checked (GC_static_roots[], all global/static variables should be within one of the regions).


how can i check ?


regards
--JS


More information about the Gc mailing list