Post #2423044
2026-04-15 08:08 UTC
@stylus@social.afront.org Thank you very much for running the experiment. I don't know how fluent you are in Caml, but it shows a deliberate but undocumented limitation in the implementation of generative exceptions (each call to f is supposed to generate a new exception according to documentation). It's not even worth reporting (first, the implementers know; second, 32-bit OCaml is no longer supported).
Writing the PoC, and seeing it work, I realized that the line if !c = 0L then the_exn := Foo; isn't even necessary! The bug is not just that one Foo if saved will end up equal to another Foo. A certain Foo should also eventually end up being equal to the pre-defined Exit exception, a much sharper manifestation of the bug that could make plausible code misbehave if it ran long enough.
Replies (1)
-
@stylus@social.afront.org 2026-04-15 20:25
@void_friend@tech.lgbt I have never written a line of ocaml but now I've read a few...