Opened 5 years ago

Last modified 14 months ago

#1695 new defect

Exception handler bug when compiled with -O5?

Reported by: sjamaan Owned by:
Priority: major Milestone: 6.0.0
Component: compiler Version: 5.2.0
Keywords: Cc:
Estimated difficulty: hard

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

Change History (2)

comment:1 Changed 4 years ago by felix winkelmann

Milestone: 5.35.4

comment:2 Changed 14 months ago by felix winkelmann

Milestone: 5.46.0.0
Note: See TracTickets for help on using tickets.