[XeTeX] segfaults on linux-amd64 (le_unit32!=FT_ULong)

Jyotirmoy Bhattacharya jmoy.matecon at gmail.com
Sat Apr 22 07:39:10 CEST 2006

In XeTeXFontInst_FC.cpp (line 54), in the call to FT_Load_Sfnt_Table in
XeTeXFontInst_FC::readTable a pointer to le_uint32 is coerced to a pointer
to FT_ULong.

The freetype documentation says that FT_ULong is a typedef for unsigned
long, which on an amd64 happens to be 64 bits wide. The mistake is FT's
since an truetype specification's ulong is 32 bits wide, but anyway the
discrepancy leads to a segfault.

Passing FT_Load_Sfnt_Table a pointer to a temporary FT_ULong variable and
later assigning the variable to the le_uint32 makes the problem go away, but
I am not sure if this is the only place where we have a situation like this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20060422/5c74fefb/attachment.htm

More information about the XeTeX mailing list