Em quarta-feira, 30 de junho de 2021, às 08:53:41 -03, luigi scarso escreveu:
> On Wed, Jun 30, 2021 at 8:20 AM Ludovic Courtès wrote:
> > Hi,
> >
> > Ludovic Courtès skribis:
> > > While investigating luatex crashes in the TeX Live 2020 package of
> > > GNU Guix¹, we identified the following heap corruption reported by
> >
> > > Valgrind (this is on GNU/Linux, with glibc 2.33):
> > This time with debug info for luatex:
> Thank you for the report, I will check asap.
Thanks! I was able to run Valgrind on LuaTeX 1.13.0, which is the latest
one in TeX Live 2021.
The invalid reads and writes don’t happen on every run. I had to re-run the
command 3 or 4 times until I got the result below (which matches our
experience with the build failures in Guix packages)
--
Thanks,
Thiago
$ valgrind
--extra-debuginfo-path=/gnu/store/rkhx3pj1qi7fx6pi9p2cg2sb9zn59qmg-profile/lib/debug
luatex amsclass.ins
==239904== Memcheck, a memory error detector
==239904== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==239904== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==239904== Command: luatex amsclass.ins
==239904==
This is LuaTeX, Version 1.13.0 (TeX Live 2021)
restricted system commands enabled.
==239904== Invalid write of size 8
==239904==at 0x4860691: lua_pushlstring (lapi.c:483)
==239904==by 0x56A963: load_hyphenation (texlang.c:306)
==239904==by 0x56D0CC: undump_one_language (texlang.c:1277)
==239904==by 0x56D0CC: undump_language_data (texlang.c:1290)
==239904==by 0x4E0D7F: load_fmt_file (dumpdata.c:520)
==239904==by 0x4F03DD: main_body (mainbody.c:540)
==239904==by 0x45118D: main (luatex.c:609)
==239904== Address 0x894aa30 is 0 bytes after a block of size 1,184 alloc'd
==239904==at 0x484242B: realloc (in
/gnu/store/a4xjjppiw7x0vgd2jimmzssj9i22jf5f-valgrind-3.17.0/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==239904==by 0x466BCD: my_luaalloc (luastuff.c:115)
==239904==by 0x48719C2: luaM_realloc_ (lmem.c:86)
==239904==by 0x486A122: luaD_reallocstack (ldo.c:182)
==239904==by 0x486CC17: traversethread (lgc.c:549)
==239904==by 0x486CC17: propagatemark (lgc.c:588)
==239904==by 0x486CFFF: singlestep (lgc.c:1057)
==239904==by 0x486D8BB: luaC_step (lgc.c:1137)
==239904==by 0x48606BB: lua_pushlstring (lapi.c:485)
==239904==by 0x56A963: load_hyphenation (texlang.c:306)
==239904==by 0x56D0CC: undump_one_language (texlang.c:1277)
==239904==by 0x56D0CC: undump_language_data (texlang.c:1290)
==239904==by 0x4E0D7F: load_fmt_file (dumpdata.c:520)
==239904==by 0x4F03DD: main_body (mainbody.c:540)
==239904==
==239904== Invalid write of size 4
==239904==at 0x48606A2: lua_pushlstring (lapi.c:483)
==239904==by 0x56A963: load_hyphenation (texlang.c:306)
==239904==by 0x56D0CC: undump_one_language (texlang.c:1277)
==239904==by 0x56D0CC: undump_language_data (texlang.c:1290)
==239904==by 0x4E0D7F: load_fmt_file (dumpdata.c:520)
==239904==by 0x4F03DD: main_body (mainbody.c:540)
==239904==by 0x45118D: main (luatex.c:609)
==239904== Address 0x894aa38 is 8 bytes after a block of size 1,184 alloc'd
==239904==at 0x484242B: realloc (in
/gnu/store/a4xjjppiw7x0vgd2jimmzssj9i22jf5f-valgrind-3.17.0/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==239904==by 0x466BCD: my_luaalloc (luastuff.c:115)
==239904==by 0x48719C2: luaM_realloc_ (lmem.c:86)
==239904==by 0x486A122: luaD_reallocstack (ldo.c:182)
==239904==by 0x486CC17: traversethread (lgc.c:549)
==239904==by 0x486CC17: propagatemark (lgc.c:588)
==239904==by 0x486CFFF: singlestep (lgc.c:1057)
==239904==by 0x486D8BB: luaC_step (lgc.c:1137)
==239904==by 0x48606BB: lua_pushlstring (lapi.c:485)
==239904==by 0x56A963: load_hyphenation (texlang.c:306)
==239904==by 0x56D0CC: undump_one_language (texlang.c:1277)
==239904==by 0x56D0CC: undump_language_data (texlang.c:1290)
==239904==by 0x4E0D7F: load_fmt_file (dumpdata.c:520)
==239904==by 0x4F03DD: main_body (mainbody.c:540)
==239904==
==239904== Invalid read of size 16
==239904==at 0x4861269: lua_rawset (lapi.c:809)
==239904==by 0x56A974: load_hyphenation (texlang.c:307)
==239904==by 0x56D0CC: undump_one_language (texlang.c:1277)
==239904==by 0x56D0CC: undump_language_data (texlang.c:1290)
==239904==by 0x4E0D7F: load_fmt_file (dumpdata.c:520)
==239904==by 0x4F03DD: main_body (mainbody.c:540)
==239904==by 0x45118D: main (luatex.c:609)
==239904== Address 0x894aa30 is 0 bytes after a block of size 1,184 alloc'd
==239904==at 0x484242B: realloc (in
/gnu/store/a4xjjppiw7x0vgd2jimmzssj9i22jf5f-valgrind-3.17.0/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==239904==by 0x466BCD: my_luaalloc (luastuff.c:115)
==239904==by 0x48719C2: luaM_realloc_ (lmem.c:86)
==239904==by 0x486A122: luaD_reallocstack (ldo.c:182)
==239904==by 0x486CC17: traversethread (lgc.c:549)
==239904==by