Skip to content

Commit

Permalink
Fix Begin by marking the jmp_buf correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
StavromulaBeta committed Sep 10, 2024
1 parent fe3d16c commit b68703b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -2347,7 +2347,8 @@ __attribute__((returns_twice))
static void ___begin(BLOCK f)
{
BLOCK a = gc_malloc(sizeof *a + sizeof(jmp_buf));
if (!setjmp(*(jmp_buf*)a->env))
for (uintptr_t* p = &a->env ; p < (char*)&a->env + sizeof(jmp_buf) ; ++p) gc_mark_ptr(p);
if (!setjmp(*(jmp_buf*)&a->env))
{
a->fn = oh_no;
push(box_BLOCK(a));
Expand Down

0 comments on commit b68703b

Please sign in to comment.