]> birchwood-abbey.net Git - mit-scheme.git/commitdiff
relnotes: Add note about compiler dynamic link fix.
authorTaylor R Campbell <campbell+mit-scheme@mumble.net>
Sat, 4 Jun 2022 21:02:39 +0000 (21:02 +0000)
committerTaylor R Campbell <campbell+mit-scheme@mumble.net>
Sat, 4 Jun 2022 21:03:38 +0000 (21:03 +0000)
src/relnotes/bug-dynlink [new file with mode: 0644]

diff --git a/src/relnotes/bug-dynlink b/src/relnotes/bug-dynlink
new file mode 100644 (file)
index 0000000..e299199
--- /dev/null
@@ -0,0 +1,19 @@
+Bug fix: The compiler miscompiled certain procedures requiring a
+dynamic link on the stack, starting in the 11.x series.  For example:
+
+  (define (rexists pred thing)
+    (let tlp ((thing thing))
+      (cond ((pred thing) #t)
+           ((vector? thing)
+            (let ((n (vector-length thing)))
+              (let lp ((i 0))
+                (cond ((fix:= i n) #f)
+                      ((tlp (vector-ref thing i)) #t) ;(*)
+                      (else (lp (fix:+ i 1)))))))
+           ((pair? thing)
+            (any tlp thing))
+           (else #f))))
+
+The code generator mistakenly clobbered the return value register in
+the continuation of the recursive call to `tlp' on the line marked (*)
+so the branch was never taken.