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: Maximum call stack size exceeded
testing go/parser with Node.js v18.7.0
#56498
Comments
I should note that this failure mode is 100% reproducible for me. (Please let me know if you need me to run any commands for diagnostics!) |
Reproducing on https://go.dev/cl/446178 now too. Not sure what the workaround is. |
Ran go test -v encoding/xml on a js-wasm builder and it is dying in one of the very deep unmarshal tests. Cutting the depth limit in half fixes the problem, which as far as I am concerned is good enough. |
Change https://go.dev/cl/446639 mentions this issue: |
Wasm can't handle the recusion for XML nested to depth 10,000. Cut it off at 5,000 instead. This fixes TestCVE202228131 on trybots in certain conditions. Also disable TestCVE202230633 to fix 'go test -v encoding/xml' on gomotes. Also rename errExeceededMaxUnmarshalDepth [misspelled and unwieldy] to errUnmarshalDepth. For #56498. Change-Id: I7cc337ccfee251bfd9771497be0e5272737114f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/446639 Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Wasm can't handle the recusion for XML nested to depth 10,000. Cut it off at 5,000 instead. This fixes TestCVE202228131 on trybots in certain conditions. Also disable TestCVE202230633 to fix 'go test -v encoding/xml' on gomotes. Also rename errExeceededMaxUnmarshalDepth [misspelled and unwieldy] to errUnmarshalDepth. For golang#56498. Change-Id: I7cc337ccfee251bfd9771497be0e5272737114f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/446639 Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This is now blocking #57614 so I'll be looking at this too. |
Change https://go.dev/cl/463994 mentions this issue: |
The default NodeJS V8 stack size is 984K, which is not enough to run the regexp or go/parser tests. This commit increases the stack size to 8192K, which removes the stack size limit error. Fixes golang#56498 Fixes golang#57614 Change-Id: I357885d420daf259187403deab25ff587defa0fc Reviewed-on: https://go-review.googlesource.com/c/go/+/463994 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Julien Fabre <ju.pryz@gmail.com> Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes: reproduces with go1.19.2.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Tests passing.
What did you see instead?
It appears that some function being executed by the test is compiled in a way that runs afoul of Node's default limits on stack depth.
(attn @golang/js; CC @golang/compiler)
The text was updated successfully, but these errors were encountered: