From da2c1be49c8407856a705278d2261e9734f8ea6c Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Tue, 14 Sep 2021 21:11:37 -0500 Subject: [PATCH] Fix #801 threaded abstract cyclic references in marshalling. We forgot to mark threaded abstract types as "seen" when marshalling so we would mistakenly marshal them twice. This messed up unmarshalling. --- src/core/marsh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/marsh.c b/src/core/marsh.c index b732ac6f..54bbe978 100644 --- a/src/core/marsh.c +++ b/src/core/marsh.c @@ -384,6 +384,7 @@ static void marshal_one_abstract(MarshalState *st, Janet x, int flags) { janet_abstract_incref(abstract); pushbyte(st, LB_THREADED_ABSTRACT); pushbytes(st, (uint8_t *) &abstract, sizeof(abstract)); + MARK_SEEN(); return; } #endif