[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CLISP 1996-07-22



Dr. Werner Fink <werner@boole.fs100.suse.de> wrote:
>
> The interpreter should run under Linux-2.0.29/ELF (gcc is 2.7.2.1,
> binutils 2.7.0.3/2.7.0.9, libc 5.2.18/5.4.7 and higher).
>
> On compiling the full set of possibilities I've detected that the
> generational gc will not work under ELF ... a short test of this
> can be done with the binary packages on
>  ftp://sunsite.unc.edu/pub/linux/devel/lang/lisp/clisp-linux-elf.tar.gz
> by making the lisp interpreter with the full set of the possible
> modules (make fromdir=full).

Dear Werner,

Thank you very much for the report. It is a bug in clisp's GC (generational
GC only) which occurs under certain conditions when FFI objects are present
in memory. Please apply this patch to the source before rebuilding clisp:

*** src/spvw.d.bak	Sun Jul 21 20:14:52 1996
--- src/spvw.d	Thu Mar  6 19:21:12 1997
***************
*** 4661,4677 ****
                                    { count = ((Srecord)objptr)->reclength; nextptr = objptr + size_srecord(count); }
                                    else
                                    { count = ((Xrecord)objptr)->reclength; nextptr = objptr + size_xrecord(count,((Xrecord)objptr)->recxlength); }
                                  if (nextptr >= gen0_start)
                                    { var aint ptr = (aint)&((Record)objptr)->recdata[0];
                                      if (ptr < gen0_start)
                                        { var uintL count_thispage = (gen0_start-ptr)/sizeof(object);
!                                         if ((varobject_alignment == sizeof(object)) # das erzwingt count >= count_thispage
!                                             || (count >= count_thispage)
!                                            )
                                            { count -= count_thispage; }
                                            else
                                            { count = 0; }
                                          ptr = gen0_start;
                                        }
                                      do { physpage->continued_addr = (object*)ptr;
                                           gen0_start += physpagesize;
--- 4661,4675 ----
                                    { count = ((Srecord)objptr)->reclength; nextptr = objptr + size_srecord(count); }
                                    else
                                    { count = ((Xrecord)objptr)->reclength; nextptr = objptr + size_xrecord(count,((Xrecord)objptr)->recxlength); }
                                  if (nextptr >= gen0_start)
                                    { var aint ptr = (aint)&((Record)objptr)->recdata[0];
                                      if (ptr < gen0_start)
                                        { var uintL count_thispage = (gen0_start-ptr)/sizeof(object);
!                                         if (count >= count_thispage)
                                            { count -= count_thispage; }
                                            else
                                            { count = 0; }
                                          ptr = gen0_start;
                                        }
                                      do { physpage->continued_addr = (object*)ptr;
                                           gen0_start += physpagesize;
***************
*** 4792,4808 ****
                                      { count = ((Srecord)objptr)->reclength; nextptr = objptr + size_srecord(count); }
                                      else
                                      { count = ((Xrecord)objptr)->reclength; nextptr = objptr + size_xrecord(count,((Xrecord)objptr)->recxlength); }
                                    if (nextptr >= gen0_start)
                                      { var aint ptr = (aint)&((Record)objptr)->recdata[0];
                                        if (ptr < gen0_start)
                                          { var uintL count_thispage = (gen0_start-ptr)/sizeof(object);
!                                           if ((varobject_alignment == sizeof(object)) # das erzwingt count >= count_thispage
!                                               || (count >= count_thispage)
!                                              )
                                              { count -= count_thispage; }
                                              else
                                              { count = 0; }
                                            ptr = gen0_start;
                                          }
                                        do { physpage->continued_addr = (object*)ptr;
                                             gen0_start += physpagesize;
--- 4790,4804 ----
                                      { count = ((Srecord)objptr)->reclength; nextptr = objptr + size_srecord(count); }
                                      else
                                      { count = ((Xrecord)objptr)->reclength; nextptr = objptr + size_xrecord(count,((Xrecord)objptr)->recxlength); }
                                    if (nextptr >= gen0_start)
                                      { var aint ptr = (aint)&((Record)objptr)->recdata[0];
                                        if (ptr < gen0_start)
                                          { var uintL count_thispage = (gen0_start-ptr)/sizeof(object);
!                                           if (count >= count_thispage)
                                              { count -= count_thispage; }
                                              else
                                              { count = 0; }
                                            ptr = gen0_start;
                                          }
                                        do { physpage->continued_addr = (object*)ptr;
                                             gen0_start += physpagesize;

Many thanks for your help in tracking this down!

                             Bruno