ChezScheme icon indicating copy to clipboard operation
ChezScheme copied to clipboard

Program safety in the sense of R6RS and OOM handling

Open mnieper opened this issue 2 years ago • 2 comments

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?

mnieper avatar Dec 06 '21 14:12 mnieper

Does the program crash, or is it forcibly terminated by the OS?

jltaylor-us avatar Dec 07 '21 00:12 jltaylor-us

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

mnieper avatar Dec 07 '21 07:12 mnieper