segfault on incorrect input

Martin Budaj <[email protected]> Sat, 1 May 2021 09:46:42 +0200
Newsgroups gmane.comp.tex.metapost
Message-ID <CALPsdSvoaZ2hcWyibbQX3k=nMHOZrCOptvsH8BPjKAsmLz9m3w@mail.gmail.com>
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.

Best regards
Martin

--
http://tug.org/metapost/