Here is another seg faulting example.
example3a.rkt:
#lang racket
(require (for-syntax syntax/parse))
(provide test)
(define-syntax test
(syntax-parser
[_
#:with lam+
(local-expand
#'(λ (z) (let-syntax ([z (make-rename-transformer #'z)]) z))
'expression null)
#'(define-syntax x #'lam+)]))
(test)
example3b.rkt:
#lang racket
(require "example3a.rkt")
To reproduce:
1) Open example3b.rkt in drracket and run. It may or may not crash
with a seg fault.
2) Delete compiled directory and run again.
Observations:
- A crash typically occurs after repeating the steps 2-3 times but
sometimes I have to run-and-compile 5 or more times.
- The provide appears to be necessary to cause the crash, even though
it's unused in the second file.
- I'm not sure which parts of the macro are actually needed to create
the crash but the local-expand and define-syntax seem to be involved.