[luatex] segfault when building from TL

luigi scarso luigi.scarso at gmail.com
Sat Oct 10 10:29:28 CEST 2015


On Sat, Oct 10, 2015 at 10:21 AM, Hans Hagen <pragma at wxs.nl> wrote:

> On 10/10/2015 10:07 AM, luigi scarso wrote:
>
>>
>>
>> On Sat, Oct 10, 2015 at 5:20 AM, Akira Kakuto <kakuto at fuk.kindai..ac.jp
>> <mailto:kakuto at fuk.kindai.ac.jp>> wrote:
>>
>>     Hi Norbert,
>>
>>         Then I run lualatex on a simple file loading fontspec, and
>>         now lualatex always crashes with: ...
>>
>>
>>     Because the new LuaTeX and the luaotfload 2.5 are inconsistent.
>>
>>     Thanks,
>>     Akira
>>
>> Can I reproduce it ?
>>
>> I'm using Master from TL and luatex from trunk
>>
>> $> luatex --credits
>> This is LuaTeX, Version beta-0.81.1 (TeX Live 2016/dev)
>>
>> $> fmtutil --byfmt luatex
>> $> fmtutil --byfmt lualatex
>> are both ok.
>>
>
> it might relate to this fuzzy mixed zero glyph slot / mem testing issue
> (0, null, NULL) for which we introduced the min/man fields as catch so when
> a fontloader does it right there should be no crash
>
> Hans
>

\documentclass{report}
\usepackage{luaotfload}
\usepackage {fontspec}
\begin{document}
foo
\end{document}



2613    static int ff_glyph_index(lua_State * L)
2614    {
2615        struct splinechar *glyph;
2616        int key;
2617        glyph = *check_isglyph(L, 1);
2618        if (glyph == NULL) {
2619            return luaL_error(L,
2620                              "fontloader.glyph.__index: glyph is
nonexistent\n");
2621        }
2622        if (!lua_isstring(L, 2)) {  /* 1 == 'font' */
2623            return luaL_error(L,
2624                              "fontloader.glyph.__index: can only be
indexed by string\n");
2625        }
2626        key = luaL_checkoption(L, 2, NULL, font_glyph_keys);
2627        switch (key) {
2628        case GK_name:
2629            lua_pushstring(L, glyph->name);
2630            break;

2631        case GK_unicode:
>2632            lua_pushnumber(L, glyph->unicodeenc);

where
luafontloader/src/luafflib.c:#define check_isglyph(L,b) (struct splinechar
**)luaL_checkudata(L,b,FONT_GLYPH_METATABLE)


glyph is not a valid address.

This check_isglyph looks fragile.
-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20151010/c3b3eb97/attachment.html>


More information about the luatex mailing list