ChezScheme
ChezScheme copied to clipboard
Program safety in the sense of R6RS and OOM handling
The following program
(import (rnrs (6)))
(define x (make-vector 1000000000000))
(display (vector-ref x 0))
(newline)
crashes with the message "out of memory". In which sense is this conforming to section 5.6 of the R6RS?
Does the program crash, or is it forcibly terminated by the OS?
As far as I can tell the "out of memory" message originates from this line:
https://github.com/cisco/ChezScheme/blob/main/c/segment.c#L68
The ChezScheme process terminates with exit code 1 (and is not forcibly terminated).