]> Cypherpunks repositories - gostls13.git/commit
runtime: mark map bucket slots as empty during map clear
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 4 Apr 2023 05:49:39 +0000 (12:49 +0700)
committerGopher Robot <gobot@golang.org>
Sat, 8 Apr 2023 05:25:04 +0000 (05:25 +0000)
commit231f290e51e130a1699d5c29d28133d68f43d2e9
treef84b4c63e6565ec052fba14ea3bc115e76bde2d3
parent66cac9e1e4877ac7e66f888b0599a7a4a5787b76
runtime: mark map bucket slots as empty during map clear

So iterators that are in progress can know entries have been deleted and
terminate the iterator properly.

Update #55002
Update #56351
Fixes #59411

Change-Id: I924f16a00fe4ed6564f730a677348a6011d3fb67
Reviewed-on: https://go-review.googlesource.com/c/go/+/481935
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/map.go
test/fixedbugs/issue59411.go [new file with mode: 0644]