1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-08 19:43:41 +00:00

Address #53 - marshalling fiber strangeness

The unmarshaller was not tracking fibers in references.
This commit is contained in:
Calvin Rose
2019-02-21 19:11:28 -05:00
parent 8c67bf82f6
commit 1147482e62
3 changed files with 19 additions and 0 deletions

View File

@@ -802,6 +802,9 @@ static const uint8_t *unmarshal_one_fiber(
fiber->data = NULL;
fiber->child = NULL;
/* Push fiber to seen stack */
janet_array_push(&st->lookup, janet_wrap_fiber(fiber));
/* Set frame later so fiber can be GCed at anytime if unmarshalling fails */
int32_t frame = 0;
int32_t stack = 0;