Re: Problem with STk 3.99.4 on Solaris 2.6

From: Paul Anderson <paul_at_grammatech.com>
Date: Fri, 10 Dec 1999 17:19:12 -0500

Erick:

I have some more data on this problem. I will continue
to work on it next week - until the bitter end.

1. If I factor out STk_cons and compile it with optimization,
and everything else with debugging then the interpreter will crash.

2. The crash is indeed sensitive to the -cells parameter. If I
set it low, then it crashes sooner. High, and it crashes later.

If this rings a bell, then let me know.

The preprocessor-expanded code and the assembler is attached
for anyone who is interested....

Paul.

______
Paul Anderson. GrammaTech, Inc. Tel: +1 607 273-7340
mailto:paul_at_grammatech.com http://www.grammatech.com

PRIMITIVE STk_cons(SCM x, SCM y)
{
  SCM z;
  { if (STk_gc_requested || (( STk_freelist ) == ( STk_nil )) )
                STk_gc_for_newcell();
        z = STk_freelist;
        STk_freelist = ((* STk_freelist ).storage_as.cons.cdr) ;
        STk_alloc_cells += 1;
        z ->type = 1 ;
} ;
  ((* z ).storage_as.cons.car) = x;
  ((* z ).storage_as.cons.cdr) = y;
  return z;
}

velveeta(273)% more list1.s
        .file "list1.c"
gcc2_compiled.:
.section ".text"
        .align 4
        .global STk_cons
        .type STk_cons,#function
        .proc 0110
STk_cons:
        !#PROLOGUE# 0
        save %sp,-112,%sp
        !#PROLOGUE# 1
        sethi %hi(STk_gc_requested),%o0
        ld [%o0+%lo(STk_gc_requested)],%o0
        cmp %o0,0
        bne .LL3
        mov %i0,%l0
        sethi %hi(STk_freelist),%o0
        sethi %hi(STk_nil),%o1
        ld [%o0+%lo(STk_freelist)],%o2
        ld [%o1+%lo(STk_nil)],%o0
        cmp %o2,%o0
        bne .LL4
        sethi %hi(STk_freelist),%o1
.LL3:
        call STk_gc_for_newcell,0
        nop
        sethi %hi(STk_freelist),%o1
.LL4:
        ld [%o1+%lo(STk_freelist)],%i0
        ld [%i0+4],%o0
        st %o0,[%o1+%lo(STk_freelist)]

        sethi %hi(STk_alloc_cells),%o1
        ld [%o1+%lo(STk_alloc_cells)],%o0
        add %o0,1,%o0
        st %o0,[%o1+%lo(STk_alloc_cells)]
        mov 1,%o0
        stb %o0,[%i0+8]
        st %l0,[%i0]
        st %i1,[%i0+4]
        ret
        restore
.LLfe1:
        .size STk_cons,.LLfe1-STk_cons
        .ident "GCC: (GNU) egcs-2.91.66 19990314 (egcs-1.1.2 release)"
Received on Fri Dec 10 1999 - 23:22:03 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST