Subject: [clisp-list] Re: [Fwd: [ clisp-Bugs-598128 ] values / multiple-value-list bug?]

From: Sam Steingold <[email-masked]>
Date: Fri Aug 23 06:21:01 2002

[let us move the discussion to the mailing list]

> did you receive this mail?

yes, and I replied to it yesterday:

do you have cygwin?  can you install it?
get the CLISP CVS head, then

$ make -f Makefile.devel makemake
$ ./makemake --with-dir-key --with-export-syscalls --with-dynamic-ffi \
     win32msvc msvc5 debug > src/makefile
$ cd src
$ nmake clean
$ nmake

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Lisp is a language for doing what you've been told is impossible. - Kent Pitman

---

From: James Mcclain <[email-masked]>
Date: Fri Aug 23 06:48:08 2002

dear list,

has anyone else had trouble compiling CLISP with gcc 3?  i was getting a
problem where it would seg fault in a loop inside sublis_assoc in list.d.
it turned out that the problem was caused by line 1482 of list.d (if
memory serves). i simply commented that out and compiled and shockingly
it worked and even passed 'make test'!

i was wondering if 1) the lisp interpreter i built is really okay or
just pretending to be okay 2) anyone else had seen this problem 3) anyone
has a more satisfying solution.

regards,
james mcclain

---

From: Sam Steingold <[email-masked]>
Date: Fri Aug 23 07:05:10 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] compiling CLISP with gcc 3"
> * Sent on Fri, 23 Aug 2002 09:47:26 -0400 (EDT)
> * Honorable James Mcclain <[email-masked]> writes:
>
> has anyone else had trouble compiling CLISP with gcc 3?

oy wey....
uname -a?
gcc --version?

solaris is known to have problems, others should be fine.

> i was getting a problem where it would seg fault in a loop inside
> sublis_assoc in list.d.  it turned out that the problem was caused by
> line 1482 of list.d (if memory serves). i simply commented that out
> and compiled and shockingly it worked and even passed 'make test'!

what line did you remove?

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Bill Gates is not god and Microsoft is not heaven.

---

From: James Mcclain <[email-masked]>
Date: Fri Aug 23 07:23:02 2002

> > has anyone else had trouble compiling CLISP with gcc 3?
oh sorry: linux 2.4.20-pre4 on x86, gcc 3.2

> what line did you remove?
it was line 1482 of list.d from the 2.29 tarball.
1482c1482
<       alist = popSTACK();
---
> #      alist = popSTACK();
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> clisp-list mailing list
> [email-masked]
> https://lists.sourceforge.net/lists/listinfo/clisp-list
>

---

From: Sam Steingold <[email-masked]>
Date: Fri Aug 23 11:47:03 2002

> * In message <[email-masked]>
> * On the subject of "Re: compiling CLISP with gcc 3"
> * Sent on Fri, 23 Aug 2002 10:22:03 -0400 (EDT)

this is beyond weird.
this is _very_ old code that has worked fine on __many__ platforms for
__many__ years.  your change, of course, breaks other builds.

please try the appended patch instead.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Oh Lord, give me the source code of the Universe and a good debugger!

--- list.d.~1.29.~	Wed Jun 19 18:22:08 2002
+++ list.d	Fri Aug 23 14:41:46 2002
@@ -1457,7 +1457,8 @@
 # can trigger GC
 local object sublis_assoc (object* stackptr) {
   var object alist = *(stackptr STACKop 3);
-  while (consp(alist)) {
+  pushSTACK(alist); # save the list ((u . v) ...)
+  while (consp(STACK_0)) {
     # How to treat atoms in the list?
     # a. One can ignore them.
     # b. One can signal an error on them.
@@ -1472,22 +1473,21 @@
     # definition of "association list" in the CLHS glossary and with
     # the general use of alists as lookup tables.
     # Therefore we implement (a).
-    if (mconsp(Car(alist))) { # atomare Listenelemente überspringen
-      pushSTACK(alist); # Listenrest ((u . v) ...) retten
+    if (mconsp(Car(STACK_0))) { # atomare Listenelemente überspringen
       # Testen, ob die zweiargumentige Testfunktion
       # *(stackptr-3) (eine Adresse!), angewandt auf u und das
       # vorher in *(stackptr-2) abgelegte Argument, erfüllt ist:
       var bool erg =
         (*(up2_function_t)TheMachineCode(*(stackptr STACKop -3))) # zweiargumentige Testfunktion, wurde abgelegt
-        ( stackptr, *(stackptr STACKop -2), Car(Car(alist)) ); # auf (KEY x) und u anwenden
-      alist = popSTACK();
+        ( stackptr, *(stackptr STACKop -2), Car(Car(STACK_0)) ); # auf (KEY x) und u anwenden
       if (erg)
         # Test erfüllt -> x = (u . v) = (CAR alist) als Ergebnis
-        return Car(alist);
+        return Car(popSTACK());
       # Test nicht erfüllt
     }
-    alist = Cdr(alist); # Tail-End-Rekursion
+    STACK_0 = Cdr(STACK_0); # Tail-End-Rekursion
   }
+  skipSTACK(1);
   # Listenende erreicht -> ergibt Ergebnis NIL
   return NIL;
 }

---

From: James Mcclain <[email-masked]>
Date: Fri Aug 23 20:16:04 2002

dear Sam,

thank you for the patch, it worked perfectly for me.

regards,
james mcclain

---

From: Sam Steingold <[email-masked]>
Date: Thu Aug 29 06:33:03 2002

Christian,
any luck debugging this?

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Re: [Fwd: [ clisp-Bugs-598128 ] values / multiple-value-list bug?]"
> * Sent on 23 Aug 2002 09:19:59 -0400
> * Honorable Sam Steingold <[email-masked]> writes:
>

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
My inferiority complex is the only thing I can be proud of.