Skip to content

Commit

Permalink
gc: add early-out for empty arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Nov 12, 2019
1 parent a77b2c1 commit 629d1a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2334,7 +2334,7 @@ mark: {
}
goto pop;
}
if (!flags.ptrarray || a->data == NULL)
if (!flags.ptrarray || a->data == NULL || jl_array_len(a) == 0)
goto pop;
size_t l = jl_array_len(a);
uintptr_t nptr = (l << 2) | (bits & GC_OLD);
Expand Down

0 comments on commit 629d1a6

Please sign in to comment.