diff options
| author | Damien Neil <dneil@google.com> | 2023-09-07 09:27:50 -0700 |
|---|---|---|
| committer | Damien Neil <dneil@google.com> | 2023-09-18 16:58:52 +0000 |
| commit | 0f1227c507c62b635a3b4b85f5b7a967df72b59f (patch) | |
| tree | 52063568914fd2dd2f4f3c2afbbd7fdef168dc1d /src/syscall/exec_linux.go | |
| parent | 089cc6867619da6d6a901b3835475206759c47a2 (diff) | |
| download | go-0f1227c507c62b635a3b4b85f5b7a967df72b59f.tar.xz | |
context: avoid key collisions in test afterfunc map
The afterFuncContext type, used only in tests, contains a
set of registered afterfuncs indexed by an arbitrary unique key.
That key is currently a *struct{}. Unfortunately, all
*struct{} pointers are equal to each other, so all registered
funcs share the same key. Fortunately, the tests using this
type never register more than one afterfunc.
Change the key to a *byte.
Change-Id: Icadf7d6f258e328f6e3375846d29ce0f98b60924
Reviewed-on: https://go-review.googlesource.com/c/go/+/526655
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/syscall/exec_linux.go')
0 files changed, 0 insertions, 0 deletions
