[CM] Scheme code using named let which crashes S7 Scheme

Da Shen da at liii.pro
Sat Nov 16 05:27:05 PST 2024


Here is the code snippet to crash S7 Scheme:
(define (length>? lst len) 
 (let loop ((lst lst) 
 (cnt 0)) 
 (if (null? lst) 
 (< len cnt) 
 (loop (cdr lst) (+ cnt 1))))) 
(length>? '(1 2 . 3) 2)
How to reproduce it on Debian 12:
cc -o repl repl.c s7.c -Wl,-export-dynamic -lm -I. -ldl
./repl crash.scm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20241116/5747c698/attachment.html>


More information about the Cmdist mailing list