diff options
| author | Keith Randall <khr@golang.org> | 2016-05-27 14:07:37 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2016-05-27 22:11:45 +0000 |
| commit | 42da35c699853002b7695052a8eeb3f10019cfd5 (patch) | |
| tree | 94d416a7fe6014c5c5ed25448e7593883b4be3ac /src/strings | |
| parent | 3a6a41868eb620912235f2dd3f9738c76035e731 (diff) | |
| download | go-42da35c699853002b7695052a8eeb3f10019cfd5.tar.xz | |
cmd/compile: SSA, don't let write barrier clobber return values
When we do *p = f(), we might need to copy the return value from
f to p with a write barrier. The write barrier itself is a call,
so we need to copy the return value of f to a temporary location
before we call the write barrier function. Otherwise, the call
itself (specifically, marshalling the args to typedmemmove) will
clobber the value we're trying to write.
Fixes #15854
Change-Id: I5703da87634d91a9884e3ec098d7b3af713462e7
Reviewed-on: https://go-review.googlesource.com/23522
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/strings')
0 files changed, 0 insertions, 0 deletions
