as reported by leo liu on the tex-live list, xetex crashes on enough invalid utf-8 input. his files attached. the problem here is that a .png file is being \read (due to the multiple dots in the image filename -> treated as EPSF), so naturally there is tons of invalid UTF-8. but the point is, xetex shouldn't ever crash.
Invocation is just "xelatex 2.tex" ... thanks, karl.
Anonymous
The following comment may not help, sorry.
It seems that the actual crash occurs at or near
the line 8348 in xetex.web:
cur_cmd:=eq_type(cur_cs); cur_chr:=equiv(cur_cs);
Akira
It seems the following source is enough to force XeTeX crash:
% ================
\def\A{}
\openin1=badfile
\read1 to \A
\closein1
\edef\B{\A}
\end
% ================
The file being read ("badfile") contains only 4 bytes:
F4 A7 81 81
(These four bytes are not so specific, because other
byte sequences can also reproduce the crash.)
The files are attached.
Best,
Hironobu Yamashita
I think that an attached patch XeTeX_ext.c.diff fixes the
problem. There are no crashes for badutf.tgz
and x3badfile.zip
Best,
Akira
It works! Thanks -- Hironobu
Last edit: Hironobu Yamashita 2017-11-06
Thanks for the patch, Akira; looks fine. I applied it to the SF repository, so this should be fixed for the next version.
Should be fixed in b7ef352d2c0dd164f339eaf3d522cc752bb185c4.