cmd/compile: fix uninitialized memory during type switch assertE2I2

Fixes arm64 builder crash.

The bug is possible on all architectures; you just have to get lucky
and hit a preemption or a stack growth on entry to assertE2I2.
The test stacks the deck.

Change-Id: I8419da909b06249b1ad15830cbb64e386b6aa5f6
Reviewed-on: https://go-review.googlesource.com/12890
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Russ Cox 2015-07-30 00:46:42 -04:00
parent bfac8623d5
commit c4092ac398
4 changed files with 68 additions and 3 deletions

View file

@ -152,3 +152,5 @@ func BenchSetType(n int, x interface{}) {
}
const PtrSize = ptrSize
var TestingAssertE2I2GC = &testingAssertE2I2GC