[NTG-pdftex] gcc 4.1.2 at ubuntu breaks pdftex

Martin Schröder martin at oneiros.de
Sat Oct 6 02:37:07 CEST 2007


2007/10/5, Taco Hoekwater <taco at elvenkind.com>:
> I've narrowed it down to pdftoepdf.cc: it is fine without -O, and
> broken with (just -O is enough to trigger the error, no need for -O2)

Using valgrind I narrowed it down to line 167:
    p->doc = new p_PDFDoc(docName);

With -O line 168 makes valgrind scream:
)==26759== Conditional jump or move depends on uninitialised value(s)
==26759==    at 0x49DE04: read_pdf_info (pdftoepdf.cc:168)
==26759==    by 0x49BF2C: readimage (writeimg.c:295)
==26759==    by 0x474841: scanimage (pdftex3.c:3507)
==26759==    by 0x478308: doextension (pdftex3.c:4762)
==26759==    by 0x47618C: doextension (pdftex3.c:4105)
==26759==    by 0x479A7B: maincontrol (pdftex3.c:5738)
==26759==    by 0x4170A9: mainbody (pdftexini.c:5752)
==26759==    by 0x47FB3B: main (pdftexextra.c:353)

So either my C++ foo is not good enough or gcc is simply broken. I
suspect the later: -O shouldn't break the code.

Best
   Martin


More information about the ntg-pdftex mailing list