From 6f990adc8c416ca651749f66833b9eff745c159f Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 12 Dec 2018 22:07:09 +0000 Subject: [PATCH] Call the primitives directly. These are no longer integrated, so we can't make a compound procedure call if they are interpreted -- the interpreter will stomp all over Free while we're in the middle of allocating the string, leading to mayhem. But it is safe to call the primitive, even though it is no longer open-coded. --- src/edwin/utils.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/edwin/utils.scm b/src/edwin/utils.scm index d4993ff09..c2a164cae 100644 --- a/src/edwin/utils.scm +++ b/src/edwin/utils.scm @@ -106,9 +106,9 @@ USA. ((ucode-primitive primitive-object-set-type 2) (ucode-type manifest-nm-vector) (fix:- n-words 1))) ;Subtract one for the manifest. - (set-string-length! result (fix:+ n-chars 1)) - (string-set! result n-chars #\nul) - (set-string-length! result n-chars) + ((ucode-primitive set-string-length! 2) result (fix:+ n-chars 1)) + ((ucode-primitive string-set! 3) result n-chars #\nul) + ((ucode-primitive set-string-length! 2) result n-chars) ((ucode-primitive primitive-increment-free 1) n-words) (set-interrupt-enables! mask) result))))) -- 2.25.1