aantron / bisect_ppx

Code coverage for OCaml and ReScript
http://aantron.github.io/bisect_ppx/demo/
MIT License
302 stars 60 forks source link

Fix stack overflow in HTML generation #421

Closed AllanBlanchard closed 1 year ago

AllanBlanchard commented 1 year ago

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 commented 1 year ago

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

aantron commented 1 year ago

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