Skip to content

Commit e462661

Browse files
topolarityxal-0
authored andcommitted
Add assert to src/threading.c
1 parent a71cf7c commit e462661

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/threading.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ void jl_start_threads(void)
844844
// Interactive pool threads get the low IDs, so check if this is a
845845
// default pool thread. The master thread is already on CPU 0.
846846
if (exclusive && i >= ninteractive_threads) {
847+
assert(i - ninteractive_threads < cpumasksize);
847848
mask[i - ninteractive_threads] = 1;
848849
uv_thread_setaffinity(&uvtid, mask, NULL, cpumasksize);
849850
mask[i - ninteractive_threads] = 0;

0 commit comments

Comments
 (0)