-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: OOM with mutually-recursive iter.Seq #72090
Comments
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Hi @finnw, would you be able to try your example with https://go.dev/cl/654195 to see if it helps? Some chance this is related to #72063, though maybe not.
CC @cuonglm (in case interested). |
This is still broken at tip, so I don't think CL 654195 fixes it. It certainly seems related though. |
CC @golang/compiler |
bisected to d524c95 cc @dr2chase |
Change https://go.dev/cl/654996 mentions this issue: |
I have a fix that solves the problem, "once and for all", will try to mail it soon. |
Change https://go.dev/cl/655155 mentions this issue: |
As the CL description mentioned:
They may be removed in a later step. |
Go version
go version go1.24.0 windows/amd64
Output of
go env
in your module/workspace:What did you do?
Compiling the following code (not necessary to run the resulting binary):
https://go.dev/play/p/ozUGHBgCjUv
This code implements a Trie data structure
There are two iter.Seq functions that recursively iterate over all paths from the root to the leaves
What did you see happen?
compile.exe memory use grows until it fails with an OOM error
Adding a "//go:noinline" directive to one or both Seq functions prevents this
What did you expect to see?
generate an .exe that outputs the hard-coded example strings when run
With the "//go:noinlne" it works as expected
The text was updated successfully, but these errors were encountered: