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

StackoverflowException when formatted long triple-quoted strings #1837

Closed
kentcb opened this issue Jul 21, 2021 · 0 comments · Fixed by #1838
Closed

StackoverflowException when formatted long triple-quoted strings #1837

kentcb opened this issue Jul 21, 2021 · 0 comments · Fixed by #1838

Comments

@kentcb
Copy link
Contributor

kentcb commented Jul 21, 2021

NOTE 1: I cannot use the online tool to report this bug, since it requires a lot of code and the attempt to submit to GitHub is refused because the querystring is too long. Instead, I have created a repro here

NOTE 2: I have a fix for this, which I'll PR later. I just wanted an issue for reference

Code

See gist

Result

A 500 error. When I run locally, it's due to a StackoverflowException. I assume the same is true when running the online tool, though the underlying error is understandably hidden from the client.

Problem description

Long triple-quoted strings cause a StackoverflowException within the code that parses interpolated strings, since it has recursive logic that is not tail-call recursive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants