3 // Copyright 2017 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.
12 // >= 16 bytes to avoid tiny alloc.
18 for i := 0; i < 100000; i++ {
19 m := make(map[*T]struct{}, 0)
20 for j := 0; j < 20; j++ {
21 // During the call to mapassign_fast64, the key argument
22 // was incorrectly treated as a uint64. If the stack was
23 // scanned during that call, the only pointer to k was
24 // missed, leading to *k being collected prematurely.