[Gc] After removing threads and atomic_ops I see Segmentation Fault
(too old to reply)
Dennis Clarke
2016-11-23 21:30:53 UTC
/opt/solarisstudio12.4/bin/cc -DHAVE_CONFIG_H -I./include -I./include
-I./libatomic_ops/src -I./libatomic_ops/src -D_TS_ERRNO
-xtarget=ultra2 -xarch=sparcvis -xchip=ultra2 -xcache=generic
-errwarn=%none -errhdr=%user -erroff=%none -errtags=yes -errfmt=error
-errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -Xa
-xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy
-xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -D_TS_ERRNO
tests/disclaim_bench.o tests/disclaim_bench.c
/usr/local/bin/bash ./libtool --tag=CC --mode=link
/opt/solarisstudio12.4/bin/cc -O -m64 -xtarget=ultra2 -xarch=sparcvis
-xchip=ultra2 -xcache=generic -errwarn=%none -errhdr=%user -erroff=%none
-errtags=yes -errfmt=error -errshort=full -xstrconst -xildoff
-xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc
-g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1
-L/usr/local/lib -o disclaim_bench tests/disclaim_bench.o ./libgc.la
libtool: link: /opt/solarisstudio12.4/bin/cc -O -m64 -xtarget=ultra2
-xarch=sparcvis -xchip=ultra2 -xcache=generic -errwarn=%none
-errhdr=%user -erroff=%none -errtags=yes -errfmt=error -errshort=full
-xstrconst -xildoff -xmemalign=8s -xnolibmil -Xa -xcode=pic32
-xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none
-xdebugformat=dwarf -xunroll=1 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS
-D_LARGEFILE64_SOURCE -o .libs/disclaim_bench tests/disclaim_bench.o
-L/usr/local/lib ./.libs/libgc.so -ldl -R/usr/local/lib
gmake[2]: Leaving directory
/usr/local/bin/gmake check-TESTS
gmake[2]: Entering directory
gmake[3]: Entering directory
PASS: cordtest
./test-driver: line 107: 10861 Segmentation Fault (core dumped)
"$@" > $log_file 2>&1
FAIL: gctest

wow .. we have a coredump. Nice thing about Solaris is that it will
capture everything if you ask it .. thus :

mimas$ dbx ./.libs/gctest
Reading gctest
core file header read successfully
Reading ld.so.1
Reading libgc.so.1.0.3
Reading libdl.so.1
Reading libc.so.1
Reading libc_psr.so.1
program terminated by signal SEGV (no mapping at the fault address)
Current function is GC_read_dirty (optimized)
3597 if ((*bufp++) & PG_MODIFIED) {
(dbx) where

=>[1] GC_read_dirty() (optimized), at 0xffffffff7ef1f150 (line ~3597) in
[2] GC_initiate_gc() (optimized), at 0xffffffff7ef179d8 (line ~235)
in "mark.c"
[3] GC_stopped_mark(stop_func = 0xffffffff7ef0cce0 =
&GC_never_stop_func()) (optimized), at 0xffffffff7ef0db2c (line ~673) in
[4] GC_try_to_collect_inner(stop_func = 0xffffffff7ef0cce0 =
&GC_never_stop_func()) (optimized), at 0xffffffff7ef0d718 (line ~486) in
[5] GC_init() (optimized), at 0xffffffff7ef1c1cc (line ~1282) in "misc.c"
[6] GC_enable_incremental() (optimized), at 0xffffffff7ef1c2f0 (line
~1331) in "misc.c"
[7] main() (optimized), at 0x100005534 (line ~1713) in "test.c"
(dbx) list
3597 if ((*bufp++) & PG_MODIFIED) {
3598 register struct hblk * h;
3599 ptr_t next_vaddr = vaddr + pagesize;
3600 # ifdef DEBUG_DIRTY_BITS
3601 GC_log_printf("dirty page at: %p\n", vaddr);
3602 # endif
3603 for (h = (struct hblk *)vaddr;
3604 (word)h < (word)next_vaddr; h++) {
3605 register word index = PHT_HASH(h);
3606 set_pht_entry_from_index(GC_grungy_pages,
(dbx) print bufp
bufp = 0x100280000 "<bad address 0x0000000100280000>"
(dbx) x 0x100280000 / 8 x
0x0000000100280000: dbx: core file read error: address 0x100280000
not in data space
(dbx) print *bufp
dbx: cannot access address 0x100280000


Makes me wonder how the heck bufp was initialized.


Continue reading on narkive: