Skip to content

Fix #128: avoid Marshal-ing exn value via closure#129

Open
dc-mak wants to merge 2 commits intoott-lang:masterfrom
dc-mak:dont-marshal-exn
Open

Fix #128: avoid Marshal-ing exn value via closure#129
dc-mak wants to merge 2 commits intoott-lang:masterfrom
dc-mak:dont-marshal-exn

Conversation

@dc-mak
Copy link

@dc-mak dc-mak commented May 5, 2025

No description provided.

dc-mak added 2 commits May 5, 2025 15:30
This commit fixes an observed discrepancy between running a TeX filter
straight after parsing an Ott file, or after caching it and reading the
cache.

I believe the issue is that the code for the exception handler inside
the Marshal'd closure captures a value for the exception which is not
guaranteed to be preserved:

https://ocaml.org/manual/5.3/api/Marshal.html#:~:text=Values%20of%20extensible,work%20as%20expected
https://stackoverflow.com/a/54872172

One can observe this by debug-printing the tags associated with the
exception using the diff mentioned in [this comment](ott-lang#128 (comment)).
dc-mak added a commit to dc-mak/PhD-Thesis that referenced this pull request May 5, 2025
This exposes a bug in Ott (ott-lang/ott#128)
and so I am using a patched version whilst the PR
(ott-lang/ott#129) is reviewed and merged.
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.

1 participant