[luatex] Segmentation fault by catcode table >= 0x8000
Hironori KITAGAWA
h_kitagawa2001 at yahoo.co.jp
Sun Dec 2 01:10:33 CET 2012
Hello all,
The following source causes a Segmentation fault on LuaLaTeX (r4486):
---- test.tex ---
\documentclass{article}
\begin{document}
\chardef\tmpcctb"8000
\luatexinitcatcodetable\tmpcctb
\directlua{tex.print(\the\tmpcctb, 'a')}
\end{document}
----
I found the catcode table index is only signed short, and
I think this is the cause of a Segfault.
> signed int cattable_field:16;
(inputstack.h l.37)
> line_catcode_table = (short) luacstring_cattable();
(textoken.w, l.1281)
If I replaced these two lines by the following respectively,
the above test.tex can be processed without error.
> int cattable_field;
> line_catcode_table = luacstring_cattable();
(Perhaps we also need "check_cattable_range()" in ltexlib.c)
Regards
Hironori KITAGAWA <h_kitagawa2001 at yahoo.co.jp>
More information about the luatex
mailing list