Fix for 1001-local-eval-error-backtrace-segfaults.
authorNeil Jerram <neil@ossau.uklinux.net>
Sun, 14 Jul 2002 15:43:24 +0000 (15:43 +0000)
committerNeil Jerram <neil@ossau.uklinux.net>
Sun, 14 Jul 2002 15:43:24 +0000 (15:43 +0000)
libguile/ChangeLog
libguile/eval.c

index a8566b5..a7b81f2 100644 (file)
@@ -1,3 +1,9 @@
+2002-07-13  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * eval.c (unmemocopy): Fix for
+       1001-local-eval-error-backtrace-segfaults (unmemoization crash
+       with internal definitions and local-eval).
+
 2002-07-12  Gary Houston  <ghouston@arglist.com>
 
        * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
index 172cc2e..68e0b78 100644 (file)
@@ -1472,7 +1472,9 @@ unmemocopy (SCM x, SCM env)
        z = scm_cons (n, SCM_UNSPECIFIED);
        ls = scm_cons (scm_sym_define, z);
        if (!SCM_NULLP (env))
-         SCM_SETCAR (SCM_CAR (env), scm_cons (n, SCM_CAAR (env)));
+         env = scm_cons (scm_cons (scm_cons (n, SCM_CAAR (env)),
+                                   SCM_CDAR (env)),
+                         SCM_CDR (env));
        break;
       }
     case SCM_BIT8(SCM_MAKISYM (0)):