[NTG-pdftex] update on "nasty pdf(la)tex bug on Solaris SPARC with ZFS"

Thanh Han The hanthethanh at gmail.com
Tue Sep 9 19:26:51 CEST 2008


I don't have a fix yet, just some more info: it's very
likely that the problem is caused by inconsistent
declaration of type longinteger. Tracing it down is not
easy due to nested inclusion of header files, however a
quick check can be done in gdb as follows:

,--------
| info type longinteger
|
| All types matching regular expression "longinteger":
|
| File pdftexini.c:
| typedef long long int longinteger;
|
| File pdftex0.c:
| typedef long long int longinteger;
|
| [...many files with the same declaration of longinteger...]
|
| File ../../../../src/texk/web2c/pdftexdir/writejbig2.c:
| typedef long int longinteger;
|
| File ../../../../src/texk/web2c/pdftexdir/pdftoepdf.cc:
| typedef long int longinteger;
`--------

Note that the last 2 declarations are "long int" and not "long long int"

longinteger is defined in web2c/config.h as off_t, which also has inconsistent
declaration over different files: like longinteger, it's "long long int" for
most files, except the following:

,--------
| File ../../../../src/libs/xpdf/goo/gfile.cc:
| typedef long int off_t;
|
| File ../../../../src/texk/web2c/pdftexdir/pdftoepdf.cc:
| typedef long int off_t;
`--------


Thanh



On Tue, Sep 09, 2008 at 04:20:58PM +0200, The Thanh Han wrote:
> after some hours debugging, here is what I can confirm:
>
> - the problem is with LFS enabled only; re-compiled pdftex
>   with LFS disabled doesn't have this problem.
>
> - the problem seems to be related to the value of variable
>   pdfptr gone wild at certain moment, not to the *seek()
>   functions.
>
> - it seems a bug of pdftex, not compiler.
>
>
> Regards,
> Thanh
>
> On Tue, Sep 09, 2008 at 02:49:41PM +0400, Vladimir Volovich wrote:
> > "THT" == Thanh Han The writes:
> >
> >  THT> I also confirm this bug. This is caused by LFS. I did a lot of
> >  THT> testing with pdf inclusion on utah machines before TL release,
> >  THT> unfortunately with LFS always disabled so this bug was not
> >  THT> detected.
> >
> > i tested the same on AIX, and got even weirder messages:
> >
> > [skipped]
> > (/mnt/Master/texmf-dist/tex/context/base/supp-pdf.tex
> > [Loading MPS to PDF converter (version 2006.09.02).]
> > ) <cgolfer.pdf, id=1, 597.50829pt x 845.0471pt> <use cgolfer.pdf> [1{/mnt/Maste
> > r/texmf/fonts/map/pdftex/updmap/pdftex.map} <./cgolfer.pdf>] (./test.aux) )2004
> > 640010pen_name_prefixHur_file_name
> > lose_name_suffixpdflatex: test: Invalid argument
> >
> > i'll recompile sparc-solaris and powerpc-aix using --disable-largefile
> > and will look if it helps.
> >
> > i didn't have an idea that LFS should be disabled because of such
> > buggy behavior. the above messages on AIX look strange too. at least
> > on solaris i get a meaningful error message.
> >
> > Best,
> > v.


More information about the ntg-pdftex mailing list