]> Cypherpunks repositories - gostls13.git/commit
cmd/6g: fix stack zeroing on native client
authorRuss Cox <rsc@golang.org>
Thu, 5 Jun 2014 20:40:23 +0000 (16:40 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 5 Jun 2014 20:40:23 +0000 (16:40 -0400)
commitac0e12d15800ac0e5795e823ab0e99c1eb70667b
tree23569797b39a054bc7c8cfe598d90a1a2bbfb985
parent32a5c898e3bd7d3abf1b6f6dc5ef4a23c5d32d8f
cmd/6g: fix stack zeroing on native client

I am not sure what the rounding here was
trying to do, but it was skipping the first
pointer on native client.

The code above the rounding already checks
that xoffset is widthptr-aligned, so the rnd
was a no-op everywhere but on Native Client.
And on Native Client it was wrong.

Perhaps it was supposed to be rounding down,
not up, but zerorange handles the extra 32 bits
correctly, so the rnd does not seem to be necessary
at all.

This wouldn't be worth doing for Go 1.3 except
that it can affect code on the playground.

Fixes #8155.

LGTM=r, iant
R=golang-codereviews, r, iant
CC=dvyukov, golang-codereviews, khr
https://golang.org/cl/108740047
src/cmd/6g/ggen.c
test/fixedbugs/issue8155.go [new file with mode: 0644]