[luatex] Odd behavior of luatex + fontspec + luaotfload
Taco Hoekwater
taco at elvenkind.com
Tue Jun 5 10:06:00 CEST 2012
On 06/04/2012 06:26 PM, Nicolas Holzschuch wrote:
> #0 write_cid_tounicode (pdf=0x2fdff4fc, fo=0x40427a0, f=Cannot access memory at address 0x2fcff478
> ) at ../../../source/texk/web2c/luatexdir/font/tounicode.w:479
> #1 0x0006d4b8 in write_cid_fontdictionary (pdf=0x1afbc00, fo=0x40427a0, f=21) at ../../../source/texk/web2c/luatexdir/font/writefont.w:990
Either went wrong during your compilation, or the call stack on
the iPad is too small.
write_cid_fontdictionary and write_cid_tounicode have the same
function prototype with the same argument list, and the start of
write_cid_fontdictionary is:
void write_cid_fontdictionary(PDF pdf, fo_entry * fo,
internal_font_number f)
{
int i;
fo->tounicode_objnum = write_cid_tounicode(pdf, fo, f);
So, unless something was seriously messed up, both argument lists in
the backtrace should look the exactly the same. Instead, both 'pdf'
and 'f' have changed on the call stack, and usually that happens
because the call stack has overrun. Possibly because of this:
int write_cid_tounicode(PDF pdf, fo_entry * fo, internal_font_number f)
{
int range_size[65537];
glyph_unicode_entry gtab[65537];
Changing those static local definitions into malloc-ed memory
will probably fix the bug (at least, this bug. You may well run
into a similar or different memory-related problem elsewhere).
Best wishes,
Taco
More information about the luatex
mailing list