]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make sure instrumented call has type width
authorIan Lance Taylor <iant@golang.org>
Mon, 26 Oct 2015 20:58:23 +0000 (13:58 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 3 Nov 2015 23:42:06 +0000 (23:42 +0000)
commit9179c9cb5c369e075a65a2a5addd4a0e0b099b16
treec034199bb4c1beca5b870e070b794d02b23da009
parent6326786ce7273ee65b2cdcf8ec47752b77ede293
cmd/compile: make sure instrumented call has type width

The width of the type of an external variable defined with a type
literal may not be set when the instrumentation pass is run.  There are
two cases in the standard library that fail without the call to dowidth:

../../../src/encoding/base32/base32.go:322: constant -1000000000 overflows uintptr
../../../src/encoding/base32/base32.go:329: constant -1000000000 overflows uintptr
../../../src/encoding/json/encode.go:385: constant -1000000000 overflows uintptr
../../../src/encoding/json/encode.go:387: constant -1000000000 overflows uintptr

Change-Id: I7c3334f7decdb7488595ffe4090cd262d7334283
Reviewed-on: https://go-review.googlesource.com/16331
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
misc/cgo/testsanitizers/test.bash
src/cmd/compile/internal/gc/racewalk.go