Home | History | Annotate | Download | only in test

Lines Matching refs:ERROR

21 func foo1(x int) { // ERROR "moved to heap: x$"
22 gxx = &x // ERROR "&x escapes to heap$"
25 func foo2(yy *int) { // ERROR "leaking param: yy$"
29 func foo3(x int) *int { // ERROR "moved to heap: x$"
30 return &x // ERROR "&x escapes to heap$"
35 func foo3b(t T) { // ERROR "leaking param: t$"
40 func foo4(xx, yy *int) { // ERROR "foo4 xx does not escape$" "foo4 yy does not escape$"
45 func foo5(xx **int, yy *int) { // ERROR "foo5 xx does not escape$" "foo5 yy does not escape$"
46 xx = &yy // ERROR "foo5 &yy does not escape$"
49 func foo6(xx **int, yy *int) { // ERROR "foo6 xx does not escape$" "leaking param: yy$"
53 func foo7(xx **int, yy *int) { // ERROR "foo7 xx does not escape$" "foo7 yy does not escape$"
57 func foo8(xx, yy *int) int { // ERROR "foo8 xx does not escape$" "foo8 yy does not escape$"
62 func foo9(xx, yy *int) *int { // ERROR "leaking param: xx to result ~r2 level=0$" "leaking param: yy to result ~r2 level=0$"
67 func foo10(xx, yy *int) { // ERROR "foo10 xx does not escape$" "foo10 yy does not escape$"
73 xx := &x // ERROR "foo11 &x does not escape$"
74 yy := &y // ERROR "foo11 &y does not escape$"
81 func foo12(yyy **int) { // ERROR "leaking param: yyy$"
87 func foo13(yyy **int) { // ERROR "leaking param content: yyy$"
91 func foo14(yyy **int) { // ERROR "foo14 yyy does not escape$"
95 func foo15(yy *int) { // ERROR "moved to heap: yy$"
96 xxx = &yy // ERROR "&yy escapes to heap$"
99 func foo16(yy *int) { // ERROR "leaking param: yy$"
103 func foo17(yy *int) { // ERROR "foo17 yy does not escape$"
107 func foo18(y int) { // ERROR "moved to heap: y$"
108 *xxx = &y // ERROR "&y escapes to heap$"
121 return &Bar{42, nil} // ERROR "&Bar literal escapes to heap$"
124 func NewBarp(x *int) *Bar { // ERROR "leaking param: x to result ~r1 level=-1$"
125 return &Bar{42, x} // ERROR "&Bar literal escapes to heap$"
128 func NewBarp2(x *int) *Bar { // ERROR "NewBarp2 x does not escape$"
129 return &Bar{*x, nil} // ERROR "&Bar literal escapes to heap$"
132 func (b *Bar) NoLeak() int { // ERROR "\(\*Bar\).NoLeak b does not escape$"
136 func (b *Bar) Leak() *int { // ERROR "leaking param: b to result ~r0 level=0$"
137 return &b.i // ERROR "&b.i escapes to heap$"
140 func (b *Bar) AlsoNoLeak() *int { // ERROR "leaking param: b to result ~r0 level=1$"
144 func (b Bar) AlsoLeak() *int { // ERROR "leaking param: b to result ~r0 level=0$"
148 func (b Bar) LeaksToo() *int { // ERROR "leaking param: b to result ~r0 level=0$"
149 v := 0 // ERROR "moved to heap: v$"
150 b.ii = &v // ERROR "&v escapes to heap$"
154 func (b *Bar) LeaksABit() *int { // ERROR "leaking param: b to result ~r0 level=1$"
155 v := 0 // ERROR "moved to heap: v$"
156 b.ii = &v // ERROR "&v escapes to heap$"
160 func (b Bar) StillNoLeak() int { // ERROR "Bar.StillNoLeak b does not escape$"
162 b.ii = &v // ERROR "Bar.StillNoLeak &v does not escape$"
166 func goLeak(b *Bar) { // ERROR "leaking param: b$"
176 return &Bar2{[12]int{42}, nil} // ERROR "&Bar2 literal escapes to heap$"
179 func (b *Bar2) NoLeak() int { // ERROR "\(\*Bar2\).NoLeak b does not escape$"
183 func (b *Bar2) Leak() []int { // ERROR "leaking param: b to result ~r0 level=0$"
184 return b.i[:] // ERROR "b.i escapes to heap$"
187 func (b *Bar2) AlsoNoLeak() []int { // ERROR "leaking param: b to result ~r0 level=1$"
191 func (b Bar2) AgainNoLeak() [12]int { // ERROR "Bar2.AgainNoLeak b does not escape$"
195 func (b *Bar2) LeakSelf() { // ERROR "leaking param: b$"
196 b.ii = b.i[0:4] // ERROR "b.i escapes to heap$"
199 func (b *Bar2) LeakSelf2() { // ERROR "leaking param: b$"
201 buf = b.i[0:] // ERROR "b.i escapes to heap$"
207 return func() int { // ERROR "func literal escapes to heap$"
213 x := 42 // ERROR "moved to heap: x$"
214 return func() int { // ERROR "func literal escapes to heap$"
215 x++ // ERROR "&x escapes to heap$"
222 return func() int { // ERROR "foo22 func literal does not escape$"
228 return func() int { // ERROR "func literal escapes to heap$"
234 f := func() int { // ERROR "func literal escapes to heap$"
241 f := func() int { return x } // ERROR "func literal escapes to heap$" "moved to heap: f$"
242 return &f // ERROR "&f escapes to heap$"
245 func foo23c(x int) func() int { // ERROR "moved to heap: x$"
246 return func() int { // ERROR "func literal escapes to heap$"
247 x++ // ERROR "&x escapes to heap$"
253 return func() int { // ERROR "foo24 func literal does not escape$"
260 func fooleak(xx *int) int { // ERROR "leaking param: xx$"
265 func foonoleak(xx *int) int { // ERROR "foonoleak xx does not escape$"
269 func foo31(x int) int { // ERROR "moved to heap: x$"
270 return fooleak(&x) // ERROR "&x escapes to heap$"
274 return foonoleak(&x) // ERROR "foo32 &x does not escape$"
285 func (f *Foo) fooleak() { // ERROR "leaking param: f$"
289 func (f *Foo) foonoleak() { // ERROR "\(\*Foo\).foonoleak f does not escape$"
293 func (f *Foo) Leak() { // ERROR "leaking param: f$"
297 func (f *Foo) NoLeak() { // ERROR "\(\*Foo\).NoLeak f does not escape$"
301 func foo41(x int) { // ERROR "moved to heap: x$"
302 F.xx = &x // ERROR "&x escapes to heap$"
305 func (f *Foo) foo42(x int) { // ERROR "\(\*Foo\).foo42 f does not escape$" "moved to heap: x$"
306 f.xx = &x // ERROR "&x escapes to heap$"
309 func foo43(f *Foo, x int) { // ERROR "foo43 f does not escape$" "moved to heap: x$"
310 f.xx = &x // ERROR "&x escapes to heap$"
313 func foo44(yy *int) { // ERROR "leaking param: yy$"
317 func (f *Foo) foo45() { // ERROR "\(\*Foo\).foo45 f does not escape$"
322 func (f *Foo) foo46() { // ERROR "leaking param content: f$"
326 func (f *Foo) foo47() { // ERROR "leaking param: f$"
327 f.xx = &f.x // ERROR "&f.x escapes to heap$"
332 func foo50(i *int) { // ERROR "leaking param: i$"
338 func foo51(i *int) { // ERROR "leaking param: i$"
342 func indaddr1(x int) *int { // ERROR "moved to heap: x$"
343 return &x // ERROR "&x escapes to heap$"
346 func indaddr2(x *int) *int { // ERROR "leaking param: x to result ~r1 level=0$"
347 return *&x // ERROR "indaddr2 &x does not escape$"
350 func indaddr3(x *int32) *int { // ERROR "leaking param: x to result ~r1 level=0$"
351 return *(**int)(unsafe.Pointer(&x)) // ERROR "indaddr3 &x does not escape$"
357 return *(*uint32)(unsafe.Pointer(&f)) // ERROR "Float32bits &f does not escape$"
361 return *(*float32)(unsafe.Pointer(&b)) // ERROR "Float32frombits &b does not escape$"
365 return *(*uint64)(unsafe.Pointer(&f)) // ERROR "Float64bits &f does not escape$"
369 return *(*float64)(unsafe.Pointer(&b)) // ERROR "Float64frombits &b does not escape$"
373 func float64bitsptr(f float64) *uint64 { // ERROR "moved to heap: f$"
374 return (*uint64)(unsafe.Pointer(&f)) // ERROR "&f escapes to heap$"
377 func float64ptrbitsptr(f *float64) *uint64 { // ERROR "leaking param: f to result ~r1 level=0$"
381 func typesw(i interface{}) *int { // ERROR "leaking param: i to result ~r1 level=0$"
386 v := int(*val) // ERROR "moved to heap: v$"
387 return &v // ERROR "&v escapes to heap$"
392 func exprsw(i *int) *int { // ERROR "leaking param: i to result ~r1 level=0$"
404 func foo60(i *int) *int { // ERROR "leaking param: i to result ~r1 level=0$"
410 func foo60a(i *int) *int { // ERROR "foo60a i does not escape$"
417 func foo61(i *int) *int { // ERROR "leaking param: i to result ~r1 level=0$"
426 func foo61a(i *int) *int { // ERROR "foo61a i does not escape$"
438 func foo62(i *int) *int { // ERROR "leaking param: i$"
442 s := new(S) // ERROR "foo62 new\(S\) does not escape$"
451 func foo63(m M) { // ERROR "foo63 m does not escape$"
454 func foo64(m M) { // ERROR "leaking param: m$"
458 func foo64b(m M) { // ERROR "leaking param: m$"
468 foo63(&mv) // ERROR "foo65 &mv does not escape$"
472 var mv MV // ERROR "moved to heap: mv$"
473 foo64(&mv) // ERROR "&mv escapes to heap$"
478 foo63(mv) // ERROR "foo67 mv does not escape$"
484 foo64(mv) // ERROR "mv escapes to heap$"
487 func foo69(m M) { // ERROR "leaking param: m$"
491 func foo70(mv1 *MV, m M) { // ERROR "leaking param: m$" "leaking param: mv1$"
492 m = mv1 // ERROR "mv1 escapes to heap$"
496 func foo71(x *int) []*int { // ERROR "leaking param: x$"
502 func foo71a(x int) []*int { // ERROR "moved to heap: x$"
504 y = append(y, &x) // ERROR "&x escapes to heap$"
511 y[0] = &x // ERROR "foo72 &x does not escape$"
515 var x int // ERROR "moved to heap: x$"
517 y[0] = &x // ERROR "&x escapes to heap$"
525 x := i // ERROR "moved to heap: x$"
526 y[i] = &x // ERROR "&x escapes to heap$"
534 x := i // ERROR "moved to heap: x$"
535 y[i] = &x // ERROR "&x escapes to heap$"
542 s := []int{3, 2, 1} // ERROR "foo73 \[\]int literal does not escape$"
546 defer func() { // ERROR "func literal escapes to heap$"
553 s := []int{3, 2, 1} // ERROR "foo731 \[\]int literal does not escape$"
555 vv := v // ERROR "moved to heap: vv$"
557 defer func() { // ERROR "func literal escapes to heap$"
558 vv = 42 // ERROR "&vv escapes to heap$"
565 s := []int{3, 2, 1} // ERROR "foo74 \[\]int literal does not escape$"
569 fn := func() { // ERROR "func literal escapes to heap$"
577 s := []int{3, 2, 1} // ERROR "foo74a \[\]int literal does not escape$"
579 vv := v // ERROR "moved to heap: vv$"
581 fn := func() { // ERROR "func literal escapes to heap$"
582 vv += 1 // ERROR "&vv escapes to heap$"
592 s := []int{3, 2, 1} // ERROR "foo74b \[\]int literal does not escape$"
596 array[i] = func() { // ERROR "func literal escapes to heap$"
604 s := []int{3, 2, 1} // ERROR "foo74c \[\]int literal does not escape$"
606 vv := v // ERROR "moved to heap: vv$"
608 array[i] = func() { // ERROR "func literal escapes to heap$"
609 println(&vv) // ERROR "&vv escapes to heap$" "foo74c.func1 &vv does not escape$"
614 func myprint(y *int, x ...interface{}) *int { // ERROR "leaking param: y to result ~r2 level=0$" "myprint x does not escape$"
618 func myprint1(y *int, x ...interface{}) *interface{} { // ERROR "leaking param: x to result ~r2 level=0$" "myprint1 y does not escape$"
619 return &x[0] // ERROR "&x\[0\] escapes to heap$"
622 func foo75(z *int) { // ERROR "foo75 z does not escape$"
623 myprint(z, 1, 2, 3) // ERROR "1 does not escape" "2 does not escape" "3 does not escape" "foo75 ... argument does not escape$"
626 func foo75a(z *int) { // ERROR "foo75a z does not escape$"
627 myprint1(z, 1, 2, 3) // ERROR "1 does not escape" "2 does not escape" "3 does not escape" "foo75a ... argument does not escape$"
630 func foo75esc(z *int) { // ERROR "leaking param: z$"
631 gxx = myprint(z, 1, 2, 3) // ERROR "1 does not escape" "2 does not escape" "3 does not escape" "foo75esc ... argument does not escape$"
634 func foo75aesc(z *int) { // ERROR "foo75aesc z does not escape$"
636 *ppi = myprint1(z, 1, 2, 3) // ERROR "... argument escapes to heap$" "1 escapes to heap$" "2 escapes to heap$" "3 escapes to heap$"
639 func foo75aesc1(z *int) { // ERROR "foo75aesc1 z does not escape$"
640 sink = myprint1(z, 1, 2, 3) // ERROR "... argument escapes to heap$" "1 escapes to heap$" "2 escapes to heap$" "3 escapes to heap$" "myprint1\(z, 1, 2, 3\) escapes to heap$"
643 func foo76(z *int) { // ERROR "z does not escape"
644 myprint(nil, z) // ERROR "foo76 ... argument does not escape$" "z does not escape"
647 func foo76a(z *int) { // ERROR "z does not escape"
648 myprint1(nil, z) // ERROR "foo76a ... argument does not escape$" "z does not escape"
652 myprint(nil, 1, 2, 3) // ERROR "1 does not escape" "2 does not escape" "3 does not escape" "foo76b ... argument does not escape$"
656 myprint1(nil, 1, 2, 3) // ERROR "1 does not escape" "2 does not escape" "3 does not escape" "foo76c ... argument does not escape$"
660 defer myprint(nil, 1, 2, 3) // ERROR "1 does not escape" "2 does not escape" "3 does not escape" "foo76d ... argument does not escape$"
664 defer myprint1(nil, 1, 2, 3) // ERROR "1 does not escape" "2 does not escape" "3 does not escape" "foo76e ... argument does not escape$"
670 defer myprint(nil, 1, 2, 3) // ERROR "... argument escapes to heap$" "1 escapes to heap$" "2 escapes to heap$" "3 escapes to heap$"
676 defer myprint1(nil, 1, 2, 3) // ERROR
680 func foo77(z []interface{}) { // ERROR "foo77 z does not escape$"
684 func foo77a(z []interface{}) { // ERROR "foo77a z does not escape$"
688 func foo77b(z []interface{}) { // ERROR "leaking param: z$"
693 func foo77c(z []interface{}) { // ERROR "leaking param: z$"
694 sink = myprint1(nil, z...) // ERROR "myprint1\(nil, z...\) escapes to heap$"
699 myprint(nil, &i) // ERROR "&i does not escape" "dotdotdot ... argument does not escape$"
702 myprint1(nil, &j) // ERROR "&j does not escape" "dotdotdot ... argument does not escape$"
705 func foo78(z int) *int { // ERROR "moved to heap: z$"
706 return &z // ERROR "&z escapes to heap$"
709 func foo78a(z int) *int { // ERROR "moved to heap: z$"
710 y := &z // ERROR "&z escapes to heap$"
711 x := &y // ERROR "foo78a &y does not escape$"
716 return new(int) // ERROR "new\(int\) escapes to heap$"
723 z = new(int) // ERROR "new\(int\) escapes to heap$"
731 z := new(int) // ERROR "foo81 new\(int\) does not escape$"
737 func tee(p *int) (x, y *int) { return p, p } // ERROR "leaking param: p to result x level=0$" "leaking param: p to result y level=0$"
739 func noop(x, y *int) {} // ERROR "noop x does not escape$" "noop y does not escape$"
742 var x, y, z int // ERROR "moved to heap: x$" "moved to heap: y$" "moved to heap: z$"
743 go noop(tee(&z)) // ERROR "&z escapes to heap$"
744 go noop(&x, &y) // ERROR "&x escapes to heap$" "&y escapes to heap$"
746 var u, v, w int // ERROR "moved to heap: u$" "moved to heap: v$" "moved to heap: w$"
747 defer noop(tee(&u)) // ERROR "&u escapes to heap$"
748 defer noop(&v, &w) // ERROR "&v escapes to heap$" "&w escapes to heap$"
761 func LimitFooer(r Fooer, n int64) Fooer { // ERROR "leaking param: r to result ~r2 level=-1$"
762 return &LimitedFooer{r, n} // ERROR "&LimitedFooer literal escapes to heap$"
765 func foo90(x *int) map[*int]*int { // ERROR "leaking param: x$"
766 return map[*int]*int{nil: x} // ERROR "map\[\*int\]\*int literal escapes to heap$"
769 func foo91(x *int) map[*int]*int { // ERROR "leaking param: x$"
770 return map[*int]*int{x: nil} // ERROR "map\[\*int\]\*int literal escapes to heap$"
773 func foo92(x *int) [2]*int { // ERROR "leaking param: x to result ~r1 level=0$"
778 func foo93(c chan *int) *int { // ERROR "foo93 c does not escape$"
786 func foo94(m map[*int]*int, b bool) *int { // ERROR "leaking param: m to result ~r2 level=1"
797 func foo95(m map[*int]*int, x *int) { // ERROR "foo95 m does not escape$" "leaking param: x$"
802 func foo96(m []*int) *int { // ERROR "leaking param: m to result ~r1 level=1"
807 func foo97(m [1]*int) *int { // ERROR "leaking param: m to result ~r1 level=0$"
812 func foo98(m map[int]*int) *int { // ERROR "foo98 m does not escape$"
817 func foo99(m *[1]*int) []*int { // ERROR "leaking param: m to result ~r1 level=0$"
822 func foo100(m []*int) *int { // ERROR "leaking param: m to result ~r1 level=1"
830 func foo101(m [1]*int) *int { // ERROR "leaking param: m to result ~r1 level=0$"
838 func foo101a(m [1]*int) *int { // ERROR "foo101a m does not escape$"
839 for i := range m { // ERROR "moved to heap: i$"
840 return &i // ERROR "&i escapes to heap$"
846 func foo102(m []*int, x *int) { // ERROR "foo102 m does not escape$" "leaking param: x$"
851 func foo103(m [1]*int, x *int) { // ERROR "foo103 m does not escape$" "foo103 x does not escape$"
858 func foo104(x []*int) { // ERROR "leaking param content: x"
863 func foo105(x []*int) { // ERROR "leaking param content: x"
868 func foo106(x *int) { // ERROR "leaking param: x$"
872 func foo107(x *int) map[*int]*int { // ERROR "leaking param: x$"
873 return map[*int]*int{x: nil} // ERROR "map\[\*int\]\*int literal escapes to heap$"
876 func foo108(x *int) map[*int]*int { // ERROR "leaking param: x$"
877 return map[*int]*int{nil: x} // ERROR "map\[\*int\]\*int literal escapes to heap$"
880 func foo109(x *int) *int { // ERROR "leaking param: x$"
881 m := map[*int]*int{x: nil} // ERROR "foo109 map\[\*int\]\*int literal does not escape$"
888 func foo110(x *int) *int { // ERROR "leaking param: x$"
889 m := map[*int]*int{nil: x} // ERROR "foo110 map\[\*int\]\*int literal does not escape$"
893 func foo111(x *int) *int { // ERROR "leaking param: x to result ~r1 level=0"
894 m := []*int{x} // ERROR "foo111 \[\]\*int literal does not escape$"
898 func foo112(x *int) *int { // ERROR "leaking param: x to result ~r1 level=0$"
903 func foo113(x *int) *int { // ERROR "leaking param: x to result ~r1 level=0$"
908 func foo114(x *int) *int { // ERROR "leaking param: x to result ~r1 level=0$"
909 m := &Bar{ii: x} // ERROR "foo114 &Bar literal does not escape$"
913 func foo115(x *int) *int { // ERROR "leaking param: x to result ~r1 level=0$"
919 x := 1 // ERROR "moved to heap: x$"
920 return &x // ERROR "&x escapes to heap$"
922 y := 1 // ERROR "moved to heap: y$"
923 return &y // ERROR "&y escapes to heap$"
928 func foo117(unknown func(interface{})) { // ERROR "foo117 unknown does not escape$"
929 x := 1 // ERROR "moved to heap: x$"
930 unknown(&x) // ERROR "&x escapes to heap$"
933 func foo118(unknown func(*int)) { // ERROR "foo118 unknown does not escape$"
934 x := 1 // ERROR "moved to heap: x$"
935 unknown(&x) // ERROR "&x escapes to heap$"
940 func foo119(x *int) { // ERROR "leaking param: x$"
1151 defer myprint(nil, i) // ERROR "... argument escapes to heap$" "i escapes to heap$"
1152 go myprint(nil, i) // ERROR "... argument escapes to heap$" "i escapes to heap$"
1159 defer fmt.Printf("%d", i) // ERROR "... argument escapes to heap$" "i escapes to heap$"
1160 go fmt.Printf("%d", i) // ERROR "... argument escapes to heap$" "i escapes to heap$"
1170 i = new(int) // ERROR "foo122 new\(int\) does not escape$"
1179 i = new(int) // ERROR "new\(int\) escapes to heap$"
1185 func foo124(x **int) { // ERROR "foo124 x does not escape$"
1186 var i int // ERROR "moved to heap: i$"
1187 p := &i // ERROR "&i escapes to heap$"
1188 func() { // ERROR "foo124 func literal does not escape$"
1189 *x = p // ERROR "leaking closure reference p$"
1193 func foo125(ch chan *int) { // ERROR "foo125 ch does not escape$"
1194 var i int // ERROR "moved to heap: i$"
1195 p := &i // ERROR "&i escapes to heap$"
1196 func() { // ERROR "foo125 func literal does not escape$"
1197 ch <- p // ERROR "leaking closure reference p$"
1205 var i int // ERROR "moved to heap: i$"
1206 func() { // ERROR "foo126 func literal does not escape$"
1207 px = &i // ERROR "&i escapes to heap$" "leaking closure reference i"
1216 var i int // ERROR "moved to heap: i$"
1217 p := &i // ERROR "&i escapes to heap$"
1224 p := &i // ERROR "foo128 &i does not escape$"
1230 var i int // ERROR "moved to heap: i$"
1231 p := &i // ERROR "&i escapes to heap$"
1232 func() { // ERROR "foo129 func literal does not escape$"
1233 q := p // ERROR "leaking closure reference p$"
1234 func() { // ERROR "foo129.func1 func literal does not escape$"
1235 r := q // ERROR "leaking closure reference q$"
1243 var i int // ERROR "moved to heap: i$"
1244 func() { // ERROR "foo130 func literal does not escape$"
1245 px = &i // ERROR "&i escapes to heap$" "leaking closure reference i$"
1251 var i int // ERROR "moved to heap: i$"
1252 func() { // ERROR "foo131 func literal does not escape$"
1253 px = &i // ERROR "&i escapes to heap$" "leaking closure reference i$"
1258 var i int // ERROR "moved to heap: i$"
1259 go func() { // ERROR "func literal escapes to heap$"
1260 px = &i // ERROR "&i escapes to heap$" "leaking closure reference i$"
1265 var i int // ERROR "moved to heap: i$"
1266 defer func() { // ERROR "foo133 func literal does not escape$"
1267 px = &i // ERROR "&i escapes to heap$" "leaking closure reference i$"
1273 p := &i // ERROR "foo134 &i does not escape$"
1274 func() { // ERROR "foo134 func literal does not escape$"
1276 func() { // ERROR "foo134.func1 func literal does not escape$"
1284 var i int // ERROR "moved to heap: i$"
1285 p := &i // ERROR "&i escapes to heap$"
1286 go func() { // ERROR "func literal escapes to heap$"
1288 func() { // ERROR "foo135.func1 func literal does not escape$"
1296 var i int // ERROR "moved to heap: i$"
1297 p := &i // ERROR "&i escapes to heap$"
1298 go func() { // ERROR "func literal escapes to heap$"
1299 q := p // ERROR "leaking closure reference p$"
1300 func() { // ERROR "foo136.func1 func literal does not escape$"
1301 r := q // ERROR "leaking closure reference q$"
1308 var i int // ERROR "moved to heap: i$"
1309 p := &i // ERROR "&i escapes to heap$"
1310 func() { // ERROR "foo137 func literal does not escape$"
1311 q := p // ERROR "leaking closure reference p$"
1312 go func() { // ERROR "func literal escapes to heap$"
1323 t := new(T) // ERROR "new\(T\) escapes to heap$"
1324 return &t.x[0] // ERROR "&t.x\[0\] escapes to heap$"
1333 t := new(T) // ERROR "new\(T\) escapes to heap$"
1334 return &t.x.y // ERROR "&t.x.y escapes to heap$"
1346 t := &T{} // ERROR "&T literal escapes to heap$"
1347 return U{ // ERROR "U literal escapes to heap$"
1361 func F3(x []byte) // ERROR "F3 x does not escape$"
1367 F1(buf1[:]) // ERROR "G buf1 does not escape$"
1369 var buf2 [10]byte // ERROR "moved to heap: buf2$"
1370 F2(buf2[:]) // ERROR "buf2 escapes to heap$"
1373 F3(buf3[:]) // ERROR "G buf3 does not escape$"
1375 var buf4 [10]byte // ERROR "moved to heap: buf4$"
1376 F4(buf4[:]) // ERROR "buf4 escapes to heap$"
1383 func (t *Tm) M() { // ERROR "\(\*Tm\).M t does not escape$"
1389 t := new(Tm) // ERROR "new\(Tm\) escapes to heap$"
1390 f = t.M // ERROR "foo141 t.M does not escape$"
1397 t := new(Tm) // ERROR "new\(Tm\) escapes to heap$"
1398 gf = t.M // ERROR "t.M escapes to heap$"
1404 func() { // ERROR "foo143 func literal does not escape$"
1407 t.M() // ERROR "foo143.func1 t does not escape$"
1423 foo144a(&x) // ERROR "foo144 &x does not escape$"
1425 foo144b(&y) // ERROR "foo144 &y does not escape$"
1438 func foo145(l List) { // ERROR "foo145 l does not escape$"
1440 for p = &l; p.Next != nil; p = p.Next { // ERROR "foo145 &l does not escape$"
1444 func foo146(l List) { // ERROR "foo146 l does not escape$"
1446 p = &l // ERROR "foo146 &l does not escape$"
1451 func foo147(l List) { // ERROR "foo147 l does not escape$"
1453 p = &l // ERROR "foo147 &l does not escape$"
1459 func foo148(l List) { // ERROR "foo148 l does not escape$"
1460 for p := &l; p.Next != nil; p = p.Next { // ERROR "foo148 &l does not escape$"
1466 func foo149(l List) { // ERROR "foo149 l does not escape$"
1469 for p = &l; p.Next != nil; p = p.Next { // ERROR "foo149 &l does not escape$"
1478 func foo150(x ...byte) { // ERROR "leaking param: x$"
1483 foo150(1, 2, 3) // ERROR "... argument escapes to heap$"
1490 func foo151(x *int) { // ERROR "leaking param: x$"
1495 var a [64]int // ERROR "moved to heap: a$"
1497 foo151(&(&a)[4:8][0]) // ERROR "&\(&a\)\[4:8\]\[0\] escapes to heap$" "&a escapes to heap$"
1501 var a [10]int // ERROR "moved to heap: a$"
1502 b := a[:] // ERROR "a escapes to heap$"
1503 foo151(&b[4:8][0]) // ERROR "&b\[4:8\]\[0\] escapes to heap$"
1507 var a [64]int // ERROR "moved to heap: a$"
1509 foo151(&(&a)[4:8:8][0]) // ERROR "&\(&a\)\[4:8:8\]\[0\] escapes to heap$" "&a escapes to heap$"
1513 var a [10]int // ERROR "moved to heap: a$"
1514 b := a[:] // ERROR "a escapes to heap$"
1515 foo151(&b[4:8:8][0]) // ERROR
1524 func (u *U) String() *string { // ERROR "leaking param: u to result ~r0 level=1$"
1533 func NewV(u U) *V { // ERROR "leaking param: u to result ~r1 level=-1"
1534 return &V{u.String()} // ERROR "&V literal escapes to heap$" "NewV u does not escape"
1538 a := "a" // ERROR "moved to heap: a$"
1539 u := U{&a} // ERROR "&a escapes to heap$"
1546 func foo153(v interface{}) *int { // ERROR "leaking param: v to result ~r1 level=-1$"
1548 case int: // ERROR "moved to heap: x$"
1549 return &x // ERROR "&x escapes to heap$"
1556 func f() (x int, y *int) { // ERROR "moved to heap: x$"
1557 y = &x // ERROR "&x escapes to heap$"
1561 func g() (x interface{}) { // ERROR "moved to heap: x$"
1562 x = &x // ERROR "&x escapes to heap$"
1575 x := &Lit{&i} // ERROR "ptrlitNoescape &Lit literal does not escape$" "ptrlitNoescape &i does not escape$"
1581 i := 0 // ERROR "moved to heap: i$"
1582 x := &Lit{&i} // ERROR "&i escapes to heap$" "ptrlitNoEscape2 &Lit literal does not escape$"
1583 sink = *x // ERROR "\*x escapes to heap$"
1588 i := 0 // ERROR "moved to heap: i$"
1589 x := &Lit{&i} // ERROR "&Lit literal escapes to heap$" "&i escapes to heap$"
1590 sink = x // ERROR "x escapes to heap$"
1603 func (b *Buffer) foo() { // ERROR "\(\*Buffer\).foo b does not escape$"
1604 b.buf1 = b.buf1[1:2] // ERROR "\(\*Buffer\).foo ignoring self-assignment to b.buf1$"
1605 b.buf1 = b.buf1[1:2:3] // ERROR "\(\*Buffer\).foo ignoring self-assignment to b.buf1$"
1606 b.buf1 = b.buf2[1:2] // ERROR "\(\*Buffer\).foo ignoring self-assignment to b.buf1$"
1607 b.buf1 = b.buf2[1:2:3] // ERROR "\(\*Buffer\).foo ignoring self-assignment to b.buf1$"
1610 func (b *Buffer) bar() { // ERROR "leaking param: b$"
1611 b.buf1 = b.arr[1:2] // ERROR "b.arr escapes to heap$"
1614 func (b *Buffer) baz() { // ERROR "\(\*Buffer\).baz b does not escape$"
1615 b.str1 = b.str1[1:2] // ERROR "\(\*Buffer\).baz ignoring self-assignment to b.str1$"
1616 b.str1 = b.str2[1:2] // ERROR "\(\*Buffer\).baz ignoring self-assignment to b.str1$"
1619 func (b *Buffer) bat() { // ERROR "leaking param content: b$"
1620 o := new(Buffer) // ERROR "new\(Buffer\) escapes to heap$"
1622 sink = o // ERROR "o escapes to heap$"
1625 func quux(sp *string, bp *[]byte) { // ERROR "quux bp does not escape$" "quux sp does not escape$"
1626 *sp = (*sp)[1:2] // ERROR "quux ignoring self-assignment to \*sp$"
1627 *bp = (*bp)[1:2] // ERROR "quux ignoring self-assignment to \*bp$"
1640 i := 0 // ERROR "moved to heap: i$"
1641 x.p = &i // ERROR "&i escapes to heap$"
1642 sink = x.s // ERROR "x.s escapes to heap$"
1648 b := make([]byte, 20) // ERROR "slicebytetostring0 make\(\[\]byte, 20\) does not escape$"
1649 s := string(b) // ERROR "slicebytetostring0 string\(b\) does not escape$"
1654 b := make([]byte, 20) // ERROR "slicebytetostring1 make\(\[\]byte, 20\) does not escape$"
1655 s := string(b) // ERROR "slicebytetostring1 string\(b\) does not escape$"
1661 b := make([]byte, 20) // ERROR "slicebytetostring2 make\(\[\]byte, 20\) does not escape$"
1662 s := string(b) // ERROR "string\(b\) escapes to heap$"
1663 s1 := s[0:1] // ERROR "moved to heap: s1$"
1664 sink = &s1 // ERROR "&s1 escapes to heap$"
1668 b := make([]byte, 20) // ERROR "slicebytetostring3 make\(\[\]byte, 20\) does not escape$"
1669 s := string(b) // ERROR "string\(b\) escapes to heap$"
1671 sink = s1 // ERROR "s1 escapes to heap$"
1677 s := s0 + s1 // ERROR "addstr0 s0 \+ s1 does not escape$"
1685 s += s0 + s1 // ERROR "addstr1 s0 \+ s1 does not escape$"
1690 b := make([]byte, 20) // ERROR "addstr2 make\(\[\]byte, 20\) does not escape$"
1692 s := string(b) + s0 // ERROR "addstr2 string\(b\) \+ s0 does not escape$" "addstr2 string\(b\) does not escape$"
1699 s := s0 + s1 // ERROR "s0 \+ s1 escapes to heap$"
1701 sink = s2 // ERROR "s2 escapes to heap$"
1707 s := string(x) // ERROR "intstring0 string\(x\) does not escape$"
1714 s := string(x) // ERROR "string\(x\) escapes to heap$"
1721 s := string(x) // ERROR "moved to heap: s$" "string\(x\) escapes to heap$"
1722 sink = &s // ERROR "&s escapes to heap$"
1727 x := []byte(s) // ERROR "stringtoslicebyte0 \(\[\]byte\)\(s\) does not escape$"
1733 return []byte(s) // ERROR "\(\[\]byte\)\(s\) escapes to heap$"
1738 sink = []byte(s) // ERROR "\(\[\]byte\)\(s\) escapes to heap$"
1743 x := []rune(s) // ERROR "stringtoslicerune0 \(\[\]rune\)\(s\) does not escape$"
1749 return []rune(s) // ERROR "\(\[\]rune\)\(s\) escapes to heap$"
1754 sink = []rune(s) // ERROR "\(\[\]rune\)\(s\) escapes to heap$"
1758 r := []rune{1, 2, 3} // ERROR "slicerunetostring0 \[\]rune literal does not escape$"
1759 s := string(r) // ERROR "slicerunetostring0 string\(r\) does not escape$"
1764 r := []rune{1, 2, 3} // ERROR "slicerunetostring1 \[\]rune literal does not escape$"
1765 return string(r) // ERROR "string\(r\) escapes to heap$"
1769 r := []rune{1, 2, 3} // ERROR "slicerunetostring2 \[\]rune literal does not escape$"
1770 sink = string(r) // ERROR "string\(r\) escapes to heap$"
1774 m := make(map[int]int) // ERROR "makemap0 make\(map\[int\]int\) does not escape$"
1778 sink = m[0] // ERROR "m\[0\] escapes to heap$"
1782 return make(map[int]int) // ERROR "make\(map\[int\]int\) escapes to heap$"
1786 m := make(map[int]int) // ERROR "make\(map\[int\]int\) escapes to heap$"
1787 sink = m // ERROR "m escapes to heap$"
1790 func nonescapingEface(m map[interface{}]bool) bool { // ERROR "nonescapingEface m does not escape$"
1791 return m["foo"] // ERROR "nonescapingEface .foo. does not escape$"
1794 func nonescapingIface(m map[M]bool) bool { // ERROR "nonescapingIface m does not escape$"
1795 return m[MV(0)] // ERROR "nonescapingIface MV\(0\) does not escape$"
1799 x := new(int) // ERROR "new\(int\) escapes to heap$"
1803 func issue10353a(x *int) func() { // ERROR "leaking param: x to result ~r1 level=-1$"
1804 return func() { // ERROR "func literal escapes to heap$"
1812 x := new(int) // ERROR "new\(int\) escapes to heap$"
1813 f = func() { // ERROR "func literal escapes to heap$"
1821 f := func() int { return x } // ERROR "func literal escapes to heap"
1822 slice1 := []func() int{f} // ERROR "\[\].* does not escape"
1823 slice2 := make([]func() int, 1) // ERROR "make\(.*\) does not escape"
1828 func issue12397(x, y int) { // ERROR "moved to heap: y$"
1833 gxx = &y // ERROR "&y escapes to heap$"
1837 gxx = &y // ERROR "&y escapes to heap$"