[Dev-luatex] LuaTeX segfaults on invalid UTF-8 csnames

Bruno Le Floch blflatex at gmail.com
Sun Jan 13 20:48:49 CET 2013


Hello,

LuaTeX doesn't segfault on invalid UTF-8 appearing in a file: this
simply leads to a fatal error.  However, one can build invalid UTF-8
using the bytes ^^^^^^110000 to ^^^^^^1100ff.  If one builds a control
sequence whose name is invalid UTF-8, then try to convert this
sequence to a string, LuaTeX segfaults.  Namely, both

    \expandafter\string\csname ^^^^^^1100ff\endcsname

and

    \number\expandafter`\csname ^^^^^^1100ff\endcsname

make LuaTeX segfault, but

    \edef\foo{\csname ^^^^^^1100ff\endcsname}
    \show\foo

does not (even though the invalid UTF-8 name is written to the terminal).

Regards,
Bruno



More information about the dev-luatex mailing list