Skip to content

Commit

Permalink
sha3: remove go:nocheckptr annotation
Browse files Browse the repository at this point in the history
As of Go 1.14.1, -d=checkptr no longer errors on unaligned reads of
non-pointer data.

This reverts the code change (but not the test) from CL 222855.

Fixes golang/go#37644
Updates golang/go#37298

Change-Id: I935c773a3541ed8dca7eb005d39a082eb5f10eb8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/249378
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
  • Loading branch information
Bryan C. Mills committed Aug 20, 2020
1 parent 78f92fa commit 49e5fef
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions sha3/xor_unaligned.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ func (b *storageBuf) asBytes() *[maxRate]byte {
return (*[maxRate]byte)(unsafe.Pointer(b))
}

//go:nocheckptr
//
// xorInUnaligned intentionally reads the input buffer as an unaligned slice of
// integers. The language spec is not clear on whether that is allowed.
// See:
// https://golang.org/issue/37644
// https://golang.org/issue/37298
// https://golang.org/issue/35381

// xorInUnaligned uses unaligned reads and writes to update d.a to contain d.a
// XOR buf.
func xorInUnaligned(d *state, buf []byte) {
Expand Down

0 comments on commit 49e5fef

Please sign in to comment.