sbcl.sbcl/tests/save11.test.sh
Douglas Katzman 2c8affb085 Zeroize junk at end of heap spaces when saving core
Patch to save.c by Andreas Franke, test case by me
2026-03-03 23:34:21 -05:00

21 lines
501 B
Bash

. ./subr.sh
create_test_subdirectory
tmpfasl=$TEST_DIRECTORY/$TEST_FILESTEM.fasl
tmpcore=$TEST_DIRECTORY/$TEST_FILESTEM.core
set -e
run_sbcl <<EOF
(load (compile-file "../src/code/repack-xref" :output-file "$tmpfasl"))
(save-lisp-and-die "$tmpcore")
EOF
run_sbcl <<EOF
(load "../tools-for-build/editcore")
(let ((result (sb-editcore::scan-for-end-of-page-garbage "$tmpcore")))
;; result = number of junk words found
(sb-sys:os-exit (if (> result 0) 1 $EXIT_TEST_WIN)))
EOF
exit $?