chibi-scheme
chibi-scheme copied to clipboard
Segmentation fault (phasing issue)
The following program causes Chibi to segfault:
(import (scheme base)
(only (chibi) er-macro-transformer))
(let ((x #f))
(define-syntax foo
(er-macro-transformer
(lambda (e r c)
x)))
(foo))
The binding of the identifier x does not exist during the expansion of (foo), so the above code is an error. Chibi could handle it more gracefully.
This is a known issue. The other version is:
(define-syntax foo (let ((x #f )) (er-macro-transformer ...)))
which some macro systems support but Chibi does not.