Opened 8 months ago

#1695 new defect

Exception handler bug when compiled with -O5?

Reported by: sjamaan Owned by:
Priority: major Milestone: 5.3
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 (0)

Note: See TracTickets for help on using tickets.