diff options
author | Rob Browning <rlb@defaultvalue.org> | 2021-07-03 14:01:12 -0500 |
---|---|---|
committer | Rob Browning <rlb@defaultvalue.org> | 2021-07-11 15:00:33 -0500 |
commit | d79a226359d28f4a1dc5df136e5544d699903a96 (patch) | |
tree | b857967d117f96205495cf1bbc705b7fc17c63fc /libguile/init.c | |
parent | 118ee0c50ba90ea7ad7ff1fd2a212bbbb7a66d99 (diff) | |
download | guile-d79a226359d28f4a1dc5df136e5544d699903a96.tar.gz |
Fix crash on #nil in syntaxes
In 3.0.7 (after 0cc799185576712d69f11fc794454f2f5447bef7 "Ensure
that (syntax ()) results in ("), the use of #nil in syntax-rules
expansions like this:
(define-syntax foo
(syntax-rules ()
((_ x) (eq? #nil x))))
(foo #t)
could cause a crash that looks like this:
ice-9/psyntax.scm:2795:12: In procedure syntax-violation:
Syntax error:
unknown location: unexpected syntax in form ()
To fix it, add another special case (the commit mentioned above
special-cased the empty list) to preserve #nil
* module/ice-9/psyntax.scm (gen-syntax): Preserve #nil.
* test-suite/tests/syntax.test: Test #nil in syntax expansions.
Closes: 49305
Diffstat (limited to 'libguile/init.c')
0 files changed, 0 insertions, 0 deletions