diff --git a/src/jloptions.c b/src/jloptions.c index 50ef415bc0bac..2eeb0eb03ee35 100644 --- a/src/jloptions.c +++ b/src/jloptions.c @@ -725,9 +725,11 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp) } jl_options.nthreads = nthreads + nthreadsi; } + assert(jl_options.nthreadpools == 1 || jl_options.nthreadpools == 2); int16_t *ntpp = (int16_t *)malloc_s(jl_options.nthreadpools * sizeof(int16_t)); ntpp[0] = (int16_t)nthreads; - ntpp[1] = (int16_t)nthreadsi; + if (jl_options.nthreadpools == 2) + ntpp[1] = (int16_t)nthreadsi; jl_options.nthreads_per_pool = ntpp; break; }