<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><br><div>> To: poppler@lists.freedesktop.org<br>> Date: Fri, 4 Mar 2016 13:49:38 -0800<br>> From: mathog@caltech.edu<br>> Subject: [poppler] Poppler provided printf() functions on Windows not language compliant<br>> <br>> In tracking down a bug in Inkscape here:<br>> <br>> https://bugs.launchpad.net/inkscape/+bug/1538361<br>> <br>> it was discovered that the version of Poppler in devlibs61 appears to <br>> provide its own printf() functions, which replace the usual ones, and <br>> that these mishandle this case:<br>> <br>> double val=0.0;<br>> printf("%lf\n",val);<br></div><div><br></div><div><br></div><div>poppler has classes that have member functions called printf() but I think that poppler does not redefine the printf() in the global name space. (I'm not a poppler developer. Someone will probably correct me later if I am mistaken.)</div><div><br></div><div>The stack traces in <a href="https://bugs.launchpad.net/inkscape/+bug/1538361" target="_blank" style="font-size: 12pt;">https://bugs.launchpad.net/inkscape/+bug/1538361</a> do not show any symbol names.</div><div><br></div><div>Can you link Inkscape with a build of poppler that was compiled with -g to identify the location of the replacement printf()?</div><div><br></div><div>Inside a git clone of poppler,</div><div><br></div><div>git grep printf | grep '\.\.\.'</div><div><br></div><div>returns the lines below. The only definitions of printf() are FileOutStream::printf() and QIODeviceOutStream::printf(), neither of which should affect Inkscape's calls to the stdio printf() in the global name space.</div><div><br></div><div><div>NEWS: * Use error() instead of fprintf(stderr, ...) in Annot::layoutText</div><div><br></div><div>glib/demo/find.c: str = g_strdup_printf ("Searching ... (%d%%)",</div><div><br></div><div>poppler/Stream.cc:void FileOutStream::printf(const char *format, ...)</div><div><br></div><div>poppler/Stream.h: virtual void printf (const char *format, ...) GCC_PRINTF_FORMAT(2,3) = 0;</div><div><br></div><div>poppler/Stream.h: virtual void printf (const char *format, ...);</div><div><br></div><div>qt4/src/poppler-qiodeviceoutstream-private.h: virtual void printf(const char *format, ...);</div><div><br></div><div>qt4/src/poppler-qiodeviceoutstream.cc:void QIODeviceOutStream::printf(const char *format, ...)</div><div><br></div><div>qt5/src/poppler-qiodeviceoutstream-private.h: virtual void printf(const char *format, ...);</div><div><br></div><div>qt5/src/poppler-qiodeviceoutstream.cc:void QIODeviceOutStream::printf(const char *format, ...)</div></div><div><br></div><div><br></div><div>You noticed that "nm" and "strings" both show "printf" in libpoppler, but poppler calls printf() for some error messages, so you could have found a call to printf() instead of a redefinition of printf(). Can you repeat the scan using a tool that tells whether the symbol table entry is a reference or a declaration?</div><div><br></div><div>For example, with a simple hello world program in C on Linux,</div><div><div><br></div><div>$ cc -c hello.c</div><div><br></div><div>$ nm hello.o</div><div><br></div><div>0000000000000000 T main <- T means a declaration (T = location is in the text (code) section)</div><div><br></div><div> U puts <- U means a reference (U = undefined)</div></div><div><br></div><div>If you can demonstrate conclusively that it is a bug in poppler, can you enter a bug report at bugs.freedesktop.org ?</div><div><br></div><div>Regards, <span style="font-size: 12pt;">William</span></div><div><br></div> </div></body>
</html>