Skip to content

Commit

Permalink
fix: prevent crashes in spawn by removing dynwind
Browse files Browse the repository at this point in the history
  • Loading branch information
Frewacom committed Jul 29, 2021
1 parent d1d42e8 commit 5c692b7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion guile-bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ guile_proc_spawn(SCM args)
SCM arg_exp = get_list_item(args, i);
char *arg = scm_to_locale_string(arg_exp);
cmd_args[i] = arg;
scm_dynwind_free(arg);
}
cmd_args[i] = NULL;
Arg a = {.v = cmd_args};
Expand Down
2 changes: 0 additions & 2 deletions guile-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ guile_call(GuileProcType type, scm_t_bits *proc_ptr, void *data)
fprintf(stderr, "guile: could not call proc that is NULL");
return;
}
scm_dynwind_begin(0);
SCM proc = SCM_PACK_POINTER(proc_ptr);
GuileProcData proc_data = {.proc = proc, .args = data};
void *(*func)(void*) = NULL;
Expand All @@ -159,5 +158,4 @@ guile_call(GuileProcType type, scm_t_bits *proc_ptr, void *data)
func = &guile_call_action;
}
scm_c_with_continuation_barrier(func, &proc_data);
scm_dynwind_end();
}

0 comments on commit 5c692b7

Please sign in to comment.