From 4b2e04a990d714bf63901e9cf16373eac09558ff Mon Sep 17 00:00:00 2001 From: Denis Buzdalov Date: Tue, 27 Dec 2022 18:29:11 +0300 Subject: [PATCH] [ workaround ] Workaround the invalid memory reference bug of GC of chez This is a workaround of a bug in GC of chez versions 9.5.8 and before. This workaround has a price of visible runtime performance penalty, and should be removed as soon as newer chez versions become mandatory. --- support/chez/support.ss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/chez/support.ss b/support/chez/support.ss index 78e475bc47..14f15c85d2 100644 --- a/support/chez/support.ss +++ b/support/chez/support.ss @@ -28,8 +28,8 @@ (let ((exval (car e))) (if (bwp-object? exval) (let ((val ((cdr e)))) - (begin (set-car! e val) val)) - exval))) + (begin (set-car! e (box val)) val)) + (unbox exval)))) (define (blodwen-toSignedInt x bits) (if (logbit? bits x)