test/fixedbugs/issue59334.go
raw| 1 | // run -tags=purego -gcflags=all=-d=checkptr |
| 2 | |
| 3 | // Copyright 2023 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | package main |
| 8 | |
| 9 | import "crypto/subtle" |
| 10 | |
| 11 | func main() { |
| 12 | dst := make([]byte, 5) |
| 13 | src := make([]byte, 5) |
| 14 | for _, n := range []int{1024, 2048} { // just to make the size non-constant |
| 15 | b := make([]byte, n) |
| 16 | subtle.XORBytes(dst, src, b[n-5:]) |
| 17 | } |
| 18 | } |