]> Cypherpunks repositories - gostls13.git/commit
hash/crc32: fix race between lazy Castagnoli init and Update/Write
authorRuss Cox <rsc@golang.org>
Mon, 12 Oct 2020 19:41:14 +0000 (15:41 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 13 Oct 2020 00:31:47 +0000 (00:31 +0000)
commit5ef78c4d84620f6594ad63cbd1b3b43f41670636
tree49e4184d9a4e630369d036e8d3880e75da4cd7d8
parent7bda6154caa6f0c527f4a8302e38d450b44ae68b
hash/crc32: fix race between lazy Castagnoli init and Update/Write

The switch on tab is checking tab == castagnoliTable,
but castagnoliTable can change value during a concurrent
call to MakeTable.

Fixes #41911.

Change-Id: I6124dcdbf33e17fe302baa3e1aa03202dec61b4c
Reviewed-on: https://go-review.googlesource.com/c/go/+/261639
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/hash/crc32/crc32.go
src/hash/crc32/crc32_test.go