I have this problem that seems to come down to calls to the libjpeg library from different shared libraries. Here's a snip of my valgrind report:
==25374== Invalid write of size 4
==25374== at 0x5025FC3: jpeg_CreateDecompress (in /usr/local/lib/libPdfOptimizeAPI.so)
==25374== by 0x59AAAA3: DCTStream::init() (in /usr/lib64/libpoppler.so.4.0.0)
libpoppler is one library that is supposed to have nothing to do w/libPdfOptimizeAPI. I've run ldd on both libs, and they don't mention each other, but Poppler does mention libjpeg.so.62. So it seems that Poppler links libjpeg as a shared, but PDFOptimize links it statically. Whatever the case, it seems that Poppler is calling PdfOptimize, which it has no business doing. How do I stop this?