Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent the GC task callback from segfaulting. #32088

Merged
merged 1 commit into from
May 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prevent the GC task callback from segfaulting.
It is possible when marking task objects in the GC for the associated
jl_ptls_t reference to be NULL. To determine whether a task is a root
task, we therefore also have to check if that reference is valid.
  • Loading branch information
rbehrends committed May 20, 2019
commit 028ac0746af8df0b260da4cfd74eac77e2eb2abd
3 changes: 2 additions & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2344,7 +2344,8 @@ mark: {
if (gc_cblist_task_scanner) {
export_gc_state(ptls, &sp);
gc_invoke_callbacks(jl_gc_cb_task_scanner_t,
gc_cblist_task_scanner, (ta, ta == ptls2->root_task));
gc_cblist_task_scanner,
(ta, ptls2 != NULL && ta == ptls2->root_task));
import_gc_state(ptls, &sp);
}
#ifdef COPY_STACKS
Expand Down