On 7/31/2020 6:17 PM, Marcel Fabian Krüger wrote:
Hi,
thanks for handling f file consition in LuaMetaTeX. While playing with that, I encountered a potential bug in the latest LuaMetaTeX version: If handle_error_hook is executed and returns any number, LuaMetaTeX segfaults. (I'm pretty sure that this still worked with the previous version) Minimal ConTeXt example:
\enabledirectives[system.quitonerror=false] \directlua{ print(callbacks.register('handle_error_hook', function(...) return 3 end)) } \undefined % Trigger an error \starttext \stoptext
This triggers
[...] system > ConTeXt ver: 2020.07.31 10:20 LMTX fmt: 2020.7.31 int: english/english [...] tex error > tex error on line 7 in file ./test_empty_input.tex: ! Undefined control sequence
l.7 \undefined [...] 9 \stoptext
segmentation fault (core dumped) /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex cont-yes.mki
hm, i don't use that callback myself so i hadn't notice that i swapped an argument there; show_error_hook and handle_error_hook now both get an argument passed that indicates it it was a runaway error ... an easy fix so it should work okay in the next upload Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------