[Gc] Re: [PATCH] Dealing with `.data.rel.ro'

Petter Urkedal urkedal at nbi.dk
Sat May 23 04:59:30 PDT 2009

On 2009-05-23, Boehm, Hans wrote:
> I checked in the last .data.rel.ro patch with Ivan's corrections, derived from Ludo's patch.
> I suspect this may sometimes result in appreciable improvements in speed or space on Linux.

This revision causes segfault for hugetest and threadleaktest test on
Linux x86_64:

    2009-05-22  Hans Boehm <Hans.Boehm at hp.com> (Largely from Ludovic Cortes)
    	* dyn_load.c (GC_register_dynlib_callback,
    	GC_register_dynamic_libraries_dl_iterate_phdr): Add support
    	for GNU_PT_RELRO relocations.

The backtraces are essentially the same for both tests, here for

GC_mark_from (mark_stack_top=0x419ea0f0, mark_stack=0x419da100, mark_stack_limit=0x419ea100)
    at /home/urkedal/proj/bdwgc-pu/mark.c:804
804		  deferred = *(word *)limit;
(gdb) p limit
$1 = 0x7f3b0b973e00 <Address 0x7f3b0b973e00 out of bounds>
(gdb) bt
#0  GC_mark_from (mark_stack_top=0x419ea0f0, mark_stack=0x419da100, mark_stack_limit=0x419ea100)
    at /home/urkedal/proj/bdwgc-pu/mark.c:804
#1  0x00007f3aa21463fe in GC_do_local_mark (local_mark_stack=0x419da100, local_top=0x419da100)
    at /home/urkedal/proj/bdwgc-pu/mark.c:964
#2  0x00007f3aa2146603 in GC_mark_local (local_mark_stack=0x419da100, id=1)
    at /home/urkedal/proj/bdwgc-pu/mark.c:1099
#3  0x00007f3aa214675c in GC_help_marker (my_mark_no=0)
    at /home/urkedal/proj/bdwgc-pu/mark.c:1165
#4  0x00007f3aa214df69 in GC_mark_thread (id=<value optimized out>)
    at /home/urkedal/proj/bdwgc-pu/pthread_support.c:304
#5  0x00007f3aa1f1be41 in start_thread () from /lib/libpthread.so.0
#6  0x00007f3aa1a8e9dd in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

My configuration is

./configure ...
    --enable-parallel-mark --enable-maintainer-mode --enable-threads=posix
    --disable-gcj-support --disable-static --enable-shared
    --disable-gc-assertions CFLAGS=-O2 -g


More information about the Gc mailing list