Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apiserver/client: work around compiler bug with named return values #4887

Merged
merged 1 commit into from Mar 24, 2016
Merged

apiserver/client: work around compiler bug with named return values #4887

merged 1 commit into from Mar 24, 2016

Conversation

davecheney
Copy link
Contributor

Upstream golang/go#14904

Returning a complex variable by value with a mix of named and implicit
returns was throwing off the compiler. This caused the memory occupied
by the return value to be considered dead before the end of the
function, leading to the gc freeing that memory prematurely.

The bug is not believed to not affect any shipping Go 1.6 compiler, but
it seems prudent to work around the compiler issue in our code.

(Review request: http://reviews.vapour.ws/r/4336/)

Upstream golang/go#14904

Returning a complex variable by value with a mix of named and implicit
returns was throwing off the compiler. This caused the memory occupied
by the return value to be considered dead before the end of the
function, leading to the gc freeing that memory prematurely.

The bug is not believed to not affect any shipping Go 1.6 compiler, but
it seems prudent to work around the compiler issue in our code.
@davecheney davecheney changed the title apiserver/status: work around compiler bug with named return values apiserver/client: work around compiler bug with named return values Mar 24, 2016
@davecheney
Copy link
Contributor Author

$$JFDI$$

(it's important)

@jujubot
Copy link
Collaborator

jujubot commented Mar 24, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 69d8569 into juju:master Mar 24, 2016
@davecheney davecheney deleted the fixedbug/14904 branch March 24, 2016 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants