Bug? `raise` may not fully implement the intended R6RS semantics
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- backend
Research direction
Start by reading the R6RS exception and dynamic environment semantics cited in the issue, then trace how raise and with-exception-handler manage the handler stack and thread parameters. Reproduce the expression in Chez Scheme and inspect the relevant implementation and tests. Done means the outer handler observes p as outer when the non-continuable exception is raised.
Written by the indexing model from the issue text.
Description
The expression
(call/cc
(lambda (k)
(define p (make-thread-parameter 'outer))
(define v #f)
(with-exception-handler
(lambda (obj)
(if (non-continuable-violation? obj)
(k (list v (p)))
(raise-continuable obj)))
(lambda ()
(with-exception-handler
(lambda (obj)
(if (eqv? obj 42)
(set! v (p))
(raise-continuable obj)))
(lambda ()
(parameterize ((p 'inner))
(raise 42))))))))
is evaluated to (inner inner) by Chez Scheme. The first "inner" comes from evaluating (p) in the inner exception handler that is invoked by (raise 42). This is correct by R6RS because the handler is called with the same dynamic environment (except for changes in the handler stack) as the call to raise. As the exception handler returns, raise now raises an exception with condition type &non-continuable. This is intercepted by the outer exception handler, which evaluates (p) again, this time producing the second "inner" in the case of Chez's implementation. However, by R6RS, the "non-continuable" exception should be raised in the dynamic environment of the (inner) handler where the value of the parameter p is outer.
- Dominant language
- Scheme
- Stars
- 7.4k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 19
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cisco/ChezScheme
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cisco/ChezScheme#1110 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
cisco/ChezScheme#1111 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 12/100
cisco/ChezScheme#1101 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
cisco/ChezScheme#1078 · 1 comment ·
Maintainers usually reply within 1 day
-
RFC: solution to clangd not finding "scheme.h"Possibly taken @reginaldalfret claimed this 20 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
cisco/ChezScheme#1073 · 1 comment ·
Maintainers usually reply within 1 day
All issues in cisco/ChezScheme
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kludex/python-multipart#375 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Termix-SSH/Plugin-Hosts-Config#14 · 1 comment ·
Maintainers usually reply within 4 days
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
quantum-php/framework#692 ·
Maintainers usually reply within 1 day
-
area:web kind:bug priority:p2 ready
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 11 days