]> Cypherpunks repositories - gostls13.git/commit
runtime: check that masks and shifts are correct aligned
authorShenghou Ma <minux@golang.org>
Thu, 3 Sep 2015 06:44:26 +0000 (02:44 -0400)
committerMinux Ma <minux@golang.org>
Wed, 25 Nov 2015 00:46:57 +0000 (00:46 +0000)
commit3583a44ed2ae27495626caaa431b197187dcf01b
tree571f3308f21b6be4d1107e9974af1f76caa273bc
parent3cac3b5fca48dbd5715bb05936252eba1bb51c26
runtime: check that masks and shifts are correct aligned

We need a runtime check because the original issue is encountered
when running cross compiled windows program from linux. It's better
to give a meaningful crash message earlier than to segfault later.

The added test should not impose any measurable overhead to Go
programs.

For #12415.

Change-Id: Ib4a24ef560c09c0585b351d62eefd157b6b7f04c
Reviewed-on: https://go-review.googlesource.com/14207
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_mips64x.s
src/runtime/asm_ppc64x.s
src/runtime/runtime1.go
src/runtime/stubs.go