| // buildrun -t 10 -gcflags=-d=ssa/insert_resched_checks/on,ssa/check/on |
| // Copyright 2016 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Test is disabled because it flakes when run in all.bash |
| // on some platforms, but is useful standalone to verify |
| // that rescheduling checks are working (and we may wish |
| // to investigate the flake, since it suggests that the |
| // loop rescheduling check may not work right on those |
| // This checks to see that call-free infinite loops do not |
| // block garbage collection. IF YOU RUN IT STANDALONE without |
| // -gcflags=-d=ssa/insert_resched_checks/on in a not-experimental |
| // build, it should hang. |
| func standinacorner2(i int) { |
| // contains an irreducible loop containing changes to memory |
| // println("About to stand in a corner1") |
| // println("About to stand in a corner2") |
| // println("About to stand in a corner3") |
| // println("About to GC") |