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

Stack overflow in Document::has_leading_newline on large document #4

Open
greenhat opened this issue Aug 2, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@greenhat
Copy link

greenhat commented Aug 2, 2024

The stack overflow occurs in the recursion at

Self::Concat(a, _) => a.has_leading_newline(),

during pretty printing.

To reproduce: print a midenc_codegen_masm::Program emitted with stdlib.

Workaround: increase the stack size via RUST_MIN_STACK=104857600 env var.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant