From 6efc0b8159f0fc74c0eafec988fe5434fb4d9f51 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 7 May 2023 09:49:00 +0200 Subject: call-with-values builtin doesn't leave garbage on the stack Fixes https://debbugs.gnu.org/63279. The issue was that if the producer thunk caused a backtrace, pretty-printing the call-with-values frame would segfault because there was an unininitialized slot on the stack. For functions produced by the compiler this wouldn't be a problem because there are stack maps, but primitives require that all slots on a pending stack frame be packed (no uninitialized values) and tagged (all SCM values, no unboxed values). * test-suite/tests/error-handling.test: New test. * test-suite/Makefile.am: Add new file. * libguile/vm.c (define_vm_builtins): Fix call-with-values to have a more compact stack. --- test-suite/Makefile.am | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test-suite/Makefile.am') diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index 16fa2e952..81e63bce2 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in. ## -## Copyright 2001-2020 Software Foundation, Inc. +## Copyright 2001-2020, 2023 Software Foundation, Inc. ## ## This file is part of GUILE. ## @@ -43,14 +43,15 @@ SCM_TESTS = tests/00-initial-env.test \ tests/cross-compilation.test \ tests/curried-definitions.test \ tests/dwarf.test \ - tests/encoding-escapes.test \ - tests/encoding-iso88591.test \ - tests/encoding-iso88597.test \ - tests/encoding-utf8.test \ tests/ecmascript.test \ tests/elisp.test \ tests/elisp-compiler.test \ tests/elisp-reader.test \ + tests/encoding-escapes.test \ + tests/encoding-iso88591.test \ + tests/encoding-iso88597.test \ + tests/encoding-utf8.test \ + tests/error-handling.test \ tests/eval.test \ tests/eval-string.test \ tests/exceptions.test \ -- cgit v1.2.1