[metapost] segfault on incorrect input
Hans Hagen
j.hagen at xs4all.nl
Sat May 1 16:19:24 CEST 2021
On 5/1/2021 9:46 AM, Martin Budaj wrote:
> Hi,
>
> incidentally I've found that metapost segfaults on the following
> (incorrect) input:
>
> nonstopmode;
> % erroneously, a-b written instead of a_b
> def a-b = a-c enddef;
> a-b;
> end
>
> The output is:
>
> l.4 def a-
> b = a-c enddef;
> Segmentation fault
>
> Tested on 2.00 (TeX Live 2020/Debian) and 2.01 (TeX Live 2021/W32TeX).
>
> Metafont processes the file as expected, with a regular error message.
Luigi,
It also crashes in luatex but not in luametatex so it might be somewhere
in the input buffer or error reporting part as that's done differently.
b = a-c enddef; a-b; ;
The bit after the ; is not seen in the crash.
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
-----------------------------------------------------------------
More information about the metapost
mailing list.