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

Fix stack overflow in HTML generation #421

Merged
merged 1 commit into from
Jun 25, 2023

Conversation

AllanBlanchard
Copy link
Contributor

@AllanBlanchard AllanBlanchard commented Jun 21, 2023

I found a stack overflow when running bisect on the code base of Frama-C. This PR replaces a try catch with a match exception to avoid stacking try contexts. I would probably be better to make the function tail recursive though, but I don't know when I can do it. Ok, I miss-used the [@tailcall], now it is tailrec.

@AllanBlanchard AllanBlanchard marked this pull request as draft June 21, 2023 10:08
@AllanBlanchard AllanBlanchard force-pushed the fix/html/stack-overflow branch from 13597a1 to 214828d Compare June 21, 2023 10:50
@AllanBlanchard AllanBlanchard marked this pull request as ready for review June 21, 2023 11:05
@AllanBlanchard
Copy link
Contributor Author

Ok, the CI has the same behavior as on the master branch so I guess we are OK here.

- mitigate stack overflow risk for big files
@AllanBlanchard AllanBlanchard force-pushed the fix/html/stack-overflow branch from 214828d to c9ea1a1 Compare June 24, 2023 11:20
@aantron aantron merged commit 8134269 into aantron:master Jun 25, 2023
@aantron
Copy link
Owner

aantron commented Jun 25, 2023

Thank you! This will be included in the next release.

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

Successfully merging this pull request may close these issues.

2 participants