chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

#1695: Exception handler bug when compiled with -O5?


From: Chicken Trac
Subject: #1695: Exception handler bug when compiled with -O5?
Date: Fri, 10 Apr 2020 16:30:26 -0000

#1695: Exception handler bug when compiled with -O5?
--------------------------------+----------------------
            Reporter:  sjamaan  |       Type:  defect
              Status:  new      |   Priority:  major
           Milestone:  5.3      |  Component:  compiler
             Version:  5.2.0    |   Keywords:
Estimated difficulty:  hard     |
--------------------------------+----------------------
 Reported by NieDzejkob on IRC:

 Compile the following program with -O4 or lower and it terminates. With
 -O5 it gets stuck in an endless loop in the `with-exception-handler`
 lambda.

 {{{
 (import (chicken condition))
 (display
   (handle-exceptions exn
                       (if (eq? exn 'two)
                         3
                         (abort exn))
     (let [(orig (current-exception-handler))]
       (with-exception-handler
         (lambda (exn)
           (if (eq? exn 'one)
               (abort 'two)
               (orig exn)))
         (lambda ()
           (abort 'one))))))
 }}}

-- 
Ticket URL: <https://bugs.call-cc.org/ticket/1695>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]