#297 g++ debug_gcsafety amd64 build is broken

build problems
closed-fixed
clisp (525)
5
2008-07-09
2005-12-19
No

g++ debug_gcsafety build is broken on amd64:
crash on first Symbol_value object access:

(gdb) run
Starting program:
/home/users/s/sd/sds/clisp/build-Linux-x86_64-gxx/lisp.run
STACK depth: 8181
SP depth: 16777262

Program received signal SIGSEGV, Segmentation fault.
0x00000000004896e5 in gcv_object_t::operator object
(this=0x4000000920350)
at lispbibl.d:4179
4179 nonimmprobe(one_o);
Warning: the current language does not match this frame.
(gdb) up
#1 0x0000000000681f02 in with_gc_statistics (
fun=0x4190f4 <do_gar_col_simple>) at predtype.d:3134
3134 var object flag =
Symbol_value(S(gc_statistics_stern));
(gdb) where
#0 0x00000000004896e5 in gcv_object_t::operator object
(this=0x4000000920350)
at lispbibl.d:4179
#1 0x0000000000681f02 in with_gc_statistics (
fun=0x4190f4 <do_gar_col_simple>) at predtype.d:3134
#2 0x0000000000419135 in gar_col_simple () at
spvw_garcol.d:2405
#3 0x0000000000419577 in make_space_gc_true (need=72,
heapptr=0x8fc508)
at spvw_allocate.d:219
#4 0x0000000000419cbf in allocate_vector (len=7) at
spvw_typealloc.d:89
#5 0x0000000000474382 in init_subr_tab_2 () at subrkw.d:7
#6 0x000000000047f65c in initmem () at spvw.d:1493
#7 0x000000000048467b in init_memory (p=0x8fc6b0) at
spvw.d:2904
#8 0x000000000048193c in main (argc=1,
argv=0x7fbffff6d8) at spvw.d:3232
(gdb)

note that dereferencing (this=0x4000000920350)
indicates a missing pointable_address_unchecked

the attached patch gets one beyond that
but still crashes in the first full GC:

> (ext::gc)

Program received signal SIGABRT, Aborted.
0x00000034f512e4dd in raise () from /lib64/tls/libc.so.6
(gdb) where
#0 0x00000034f512e4dd in raise () from
/lib64/tls/libc.so.6
#1 0x00000034f512fc8e in abort () from
/lib64/tls/libc.so.6
#2 0x00000000004170dc in gar_col_normal () at
spvw_garcol.d:1714
#3 0x000000000041b037 in do_gar_col () at
spvw_garcol.d:2419
#4 0x00000000006a860b in with_gc_statistics
(fun=0x41b020 <do_gar_col>)
at predtype.d:3137
#5 0x000000000041b061 in gar_col () at spvw_garcol.d:2431
#6 0x000000000067f061 in C_gc () at debug.d:1572
#7 0x00000000004b61a6 in eval_subr (fun=
{one_o = 281474986333736, allocstamp = 69861}) at
eval.d:3557
#8 0x00000000004b1919 in eval1 (form=
{one_o = 18014453487192240, allocstamp = 69860})
at eval.d:3033
#9 0x00000000004b0d4b in eval (form=
{one_o = 18014453487192240, allocstamp = 69858})
at eval.d:2907
#10 0x00000000006781be in C_read_eval_print () at
debug.d:408
#11 0x00000000004c2c89 in funcall_subr (fun=
{one_o = 281474986332672, allocstamp = 69700},
args_on_stack=1)
at eval.d:5338
#12 0x00000000004c1408 in funcall (fun=
{one_o = 281474986332672, allocstamp = 69699},
args_on_stack=1)
at eval.d:4938
#13 0x0000000000678b94 in driver () at debug.d:489
#14 0x0000000000487a0a in main_actions (p=0x929c60) at
spvw.d:3185
#15 0x000000000048537e in main (argc=1,
argv=0x7fbffff6d8) at spvw.d:3317
(gdb) up
#1 0x00000034f512fc8e in abort () from
/lib64/tls/libc.so.6
(gdb)
#2 0x00000000004170dc in gar_col_normal () at
spvw_garcol.d:1714
1714 update_STACKs();
Warning: the current language does not match this frame.
(gdb) p objptr
$1 = (gcv_object_t *) 0x2a9558b0a8
(gdb) p *objptr
$2 = {one_o = 3096238496654632}
(gdb) p/x *objptr
$3 = {one_o = 0xb000333bba528}
(gdb) p/x pointable(*objptr)
$4 = 0x333bba528
(gdb) p/x pgci_pointable(*objptr)

Program received signal SIGABRT, Aborted.
0x00000034f512e4dd in raise () from /lib64/tls/libc.so.6
The program being debugged was signaled while in a
function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function
(pgci_pointable) will be ab
andoned.
(gdb)

see also
http://sourceforge.net/tracker/index.php?func=detail&aid=1376646&group_id=1355&atid=101355

Discussion

  • Sam Steingold

    Sam Steingold - 2005-12-19

    amd64 gcsafety patch attempt

     
  • Sam Steingold

    Sam Steingold - 2008-07-09

    Logged In: YES
    user_id=5735
    Originator: YES

    it appears that the 2008-02-26 workaround for 1376646 together with this patch fixes this bug.
    Bruno, please review the patch.

     
  • Sam Steingold

    Sam Steingold - 2008-07-09
    • assigned_to: haible --> sds
    • status: open --> closed-fixed
     
  • Sam Steingold

    Sam Steingold - 2008-07-09

    Logged In: YES
    user_id=5735
    Originator: YES

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks