12 Aug 14:03
Bug report
From: Benedikt Rosenau <rosenau <at> imperial.addict.de>
Subject: Bug report
Newsgroups: gmane.lisp.scheme.bigloo
Date: 2008-08-12 12:06:35 GMT
Expires: This article expires on 2008-08-26
Subject: Bug report
Newsgroups: gmane.lisp.scheme.bigloo
Date: 2008-08-12 12:06:35 GMT
Expires: This article expires on 2008-08-26
Hallo Manuel, I attached a short program to this mail. This program leads to a segmentation fault both in interpreted and compiled mode. Compiling with debug information and running through a debugger shows that the problem comes from line 9 and 10 of the source code. However, a backtrace shows that the program ran into an endless loop without reason. Regards, Benedikt
(module eliminate-showcase)
(define (replace-expression-with-symbol expr sym l)
(cond
((equal? expr l) sym)
((list? l) (map (lambda (e) replace-expression-with-symbol expr sym e) l))
(else l)))
(define (first-true-sublist l)
(let loop ((work-list l))
(if (null? work-list)
l
(let ((e (car work-list)))
(if (list? e) (first-true-sublist e) (loop (cdr work-list)))))))
(define (eliminate l)
(if (list? l)
(let ((sym (gensym)) (sub-list (first-true-sublist l)))
(Continue reading)
RSS Feed