Skip to content

Commit d1be33d

Browse files
authored
Assert tid>0 in workqueue_for (#50602)
Otherwise the inbounds annotations are not sound. As requested in #50597 (review).
1 parent 6691a75 commit d1be33d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

base/task.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ function workqueue_for(tid::Int)
755755
return @inbounds qs[tid]
756756
end
757757
# slow path to allocate it
758+
@assert tid > 0
758759
l = Workqueues_lock
759760
@lock l begin
760761
qs = Workqueues

0 commit comments

Comments
 (0)