Referencing a variable in a closure captures it by _address_. So referencing a loop variable can go horribly wrong: https://go.dev/play/p/f2ivPAIN_bG This is accepted as essentially a bug by Go and will be fixed in a future release (https://github.com/golang/go/wiki/LoopvarExperiment). But, for now at least, work around it. Our tests trim the ACVP inputs to only have a single test case per group in many cases, which hides most of this issue from tests. When we run run full ACVP sets, our modulewrapper is seemingly fast enough not to notice there either. But I've updated one of the tests here by duplicating a test case enough that it catches this a meaningful amount of the time. Change-Id: I8216c00f67636ab7dad927eae4b49ae45ae3cf31 Bug: 646 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/62965 Reviewed-by: David Benjamin <davidben@google.com> Auto-Submit: Adam Langley <agl@google.com> Commit-Queue: David Benjamin <davidben@google.com>chromium-stable
parent
8e7025e3df
commit
be84aeed7d
17 changed files with 48 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue