[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
#1756: module system segfaulting at O3
From: |
Chicken Trac |
Subject: |
#1756: module system segfaulting at O3 |
Date: |
Mon, 24 May 2021 05:46:21 -0000 |
#1756: module system segfaulting at O3
---------------------------------------+-----------------------
Reporter: Idiomdrottning | Type: defect
Status: new | Priority: critical
Milestone: someday | Component: unknown
Version: 5.2.0 | Keywords: matchable
Estimated difficulty: |
---------------------------------------+-----------------------
{{{
(module main ()
(import
scheme
(only chicken.base print)
(only matchable match-lambda*))
(define mdplus
(match-lambda*
(( (? list? x) (? list? y)) (append x y))
(( (? string? x) (? string? y)) (string-append x y))
(( (? number? x) (? number? y)) (+ x y))))
(mdplus 1 2)
(mdplus 3 4))
}}}
So for me this segfaults when compiled at -O3.
Any two mdplus calls in the actual text. You can wrap it in dotimes ten
gazillion and that's fine, that doesn't crash. It only crashes when there
are actually two mdplus calls in the actual text.
To cause the crash, the two calls can have the same arguments or they can
have different arguments, that doesn't seem to make a difference.
It doesn't crash when mdplus is imported, it only crashes when it's
defined directly in the module.
It also doesn't crash when there isn't a module, i.e. removing the first
line and the last paren from the above file also removes the crash.
Importing full matchable as opposed to just only match-lambda* does not
remove the crash.
It does not crash in the interpreter, only when compiled O3.
Expanding and reexpanding and rereexpanding the match-lambda* stuff we end
up with some macros that aren't exported from matchable, such as match-
next. Idk but that's what leads me to suspect that there is a module
system issue.
--
Ticket URL: <https://bugs.call-cc.org/ticket/1756>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- #1756: module system segfaulting at O3,
Chicken Trac <=