[g++] -O produces incorrect code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
the pdfTeX team is looking for help tracking down a bug in g++ (or in our code).

The bug: If the trunk of pdftex is compiled with -O, PDF inclusion
fails. With -O0, everything is fine. This happens with
g++ (GCC) 3.3.5 (propolice) (OpenBSD 4.1)
g++ (GCC) 4.1.0 (SUSE Linux) (SuSE 10.1)
g++ (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) (SuSE 10.2)
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4) (Ubuntu 7.04)

We have tracked it down to one source file; if it is compiled with -O,
we get the above error and valgrind screams:
==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)

I'm at loss on how to fix this.

Please contact me offlist if you are willing to help.

Thanks in advance
   Martin

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux