Summary

Exception handler bug when compiled with -O5?

Metadata

Description

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))))))

Changes and comments

[2021-04-18 11:20:47 UTC] felix changed milestone from 5.3 to 5.4

[2023-11-06 22:13:03 UTC] felix changed milestone from 5.4 to 6.0.0