/ go Public
cmd/compile: Allocations leak into outer scope #39514
Issues related to the Go compiler and/or runtime.
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
Does this issue reproduce with the latest release?
I believe I'm on the latest release
What operating system and processor architecture are you using (
What did you do?
I hit a strange issue while doing some benchmarking in go-ethereum . It turned out that the allocations for a particular operation went through the roof, for no good reason as far as I could tell.
I narrowed down the problem as best I could. this gist contains a tiny VM + benchmarking code which shows two cases: one where allocations are made for a branch that is never taken, and another where the unused branch is commented out, and allocations are "sane".
It's quite a difference:
What did you expect to see?
That allocations inside a scope which was never entered are not made.
What did you see instead?
That allocations seems to be done outside the scope, directly after the entry into the method.
The text was updated successfully, but these errors were encountered: