go/src/hash
Russ Cox 5ef78c4d84 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>
2020-10-13 00:31:47 +00:00
..
adler32 crypto, hash: document marshal/unmarshal implementation 2017-11-15 00:06:24 +00:00
crc32 hash/crc32: fix race between lazy Castagnoli init and Update/Write 2020-10-13 00:31:47 +00:00
crc64 hash/crc64: use t.Fatalf in TestGolden 2018-10-25 06:32:12 +00:00
fnv hash/fnv: use bits.Mul64 for 128-bit hash 2018-12-10 22:50:48 +00:00
maphash hash/maphash: adjust package comment 2020-10-12 16:30:45 +00:00
example_test.go hash: add marshaling, unmarshaling example 2017-11-04 03:47:34 +00:00
hash.go hash: document that the encoded state may contain input in plaintext 2017-11-13 22:14:58 +00:00
marshal_test.go hash: add MarshalBinary/UnmarshalBinary round trip + golden test for all implementations 2017-12-06 07:45:46 +00:00
test_cases.txt
test_gen.awk