From ae153d1f698b0a0eadf70c1b1b5e8ef6d243b734 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Wed, 19 Jul 2023 15:38:51 -0400 Subject: [PATCH] Assert tid>0 in workqueue_for Otherwise the inbounds annotations are not sound. As requested in https://github.com/JuliaLang/julia/pull/50597#pullrequestreview-1537852869. --- base/task.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/base/task.jl b/base/task.jl index feec0371f754a..e49dcdc4bdfce 100644 --- a/base/task.jl +++ b/base/task.jl @@ -755,6 +755,7 @@ function workqueue_for(tid::Int) return @inbounds qs[tid] end # slow path to allocate it + @assert tid > 0 l = Workqueues_lock @lock l begin qs = Workqueues