Loading a jpeg file when running krita with memcheck generates the following output: ==23851== Invalid read of size 8 ==23851== at 0x19877727: ??? (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x1647057F: ??? ==23851== by 0x1986E35B: ??? (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x19868C10: ??? (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x19862871: jpeg_read_scanlines (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x37DD48D4: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:247) ==23851== by 0x37DD75BA: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==23851== by 0x37DD08DF: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==23851== by 0x645EA47: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==23851== by 0x6455A08: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==23851== by 0x6453FB6: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==23851== by 0x6406B68: KoDocument::openFile() (KoDocument.cpp:1501) ==23851== Address 0x1c5eae58 is 7,048 bytes inside a block of size 7,050 alloc'd ==23851== at 0x4C26099: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==23851== by 0x37DD46E8: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:243) ==23851== by 0x37DD75BA: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==23851== by 0x37DD08DF: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==23851== by 0x645EA47: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==23851== by 0x6455A08: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==23851== by 0x6453FB6: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==23851== by 0x6406B68: KoDocument::openFile() (KoDocument.cpp:1501) ==23851== by 0x673061F: ??? (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6730C75: KParts::ReadOnlyPart::openUrl(KUrl const&) (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6409BAA: KoDocument::openUrl(KUrl const&) (KoDocument.cpp:1260) ==23851== by 0x63FAEAC: KoDocument::openExistingFile(KUrl const&) (KoDocument.cpp:2603) ==23851== ==23851== Invalid read of size 8 ==23851== at 0x19877727: ??? (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x5FC0A26: KisHLineConstIterator::KisHLineConstIterator(KisDataManager*, int, int, int, bool) (kis_memory_leak_tracker.h:66) ==23851== by 0x6001B9F: KisPaintDevice::createHLineIterator(int, int, int, KisSelection const*) (kis_iterator.h:165) ==23851== by 0x37DD48D4: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:247) ==23851== by 0x37DD75BA: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==23851== by 0x37DD08DF: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==23851== by 0x645EA47: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==23851== by 0x6455A08: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==23851== by 0x6453FB6: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==23851== by 0x6406B68: KoDocument::openFile() (KoDocument.cpp:1501) ==23851== by 0x673061F: ??? (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6730C75: KParts::ReadOnlyPart::openUrl(KUrl const&) (in /usr/lib64/libkparts.so.4.7.0) ==23851== Address 0x1c5eae58 is 7,048 bytes inside a block of size 7,050 alloc'd ==23851== at 0x4C26099: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==23851== by 0x37DD46E8: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:243) ==23851== by 0x37DD75BA: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==23851== by 0x37DD08DF: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==23851== by 0x645EA47: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==23851== by 0x6455A08: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==23851== by 0x6453FB6: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==23851== by 0x6406B68: KoDocument::openFile() (KoDocument.cpp:1501) ==23851== by 0x673061F: ??? (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6730C75: KParts::ReadOnlyPart::openUrl(KUrl const&) (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6409BAA: KoDocument::openUrl(KUrl const&) (KoDocument.cpp:1260) ==23851== by 0x63FAEAC: KoDocument::openExistingFile(KUrl const&) (KoDocument.cpp:2603) ==23851== ==23851== Invalid read of size 8 ==23851== at 0x19877727: ??? (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x7FEFFAF97: ??? ==23851== by 0x1986E35B: ??? (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x19868C9C: ??? (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x19862871: jpeg_read_scanlines (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x37DD48D4: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:247) ==23851== by 0x37DD75BA: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==23851== by 0x37DD08DF: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==23851== by 0x645EA47: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==23851== by 0x6455A08: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==23851== by 0x6453FB6: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==23851== by 0x6406B68: KoDocument::openFile() (KoDocument.cpp:1501) ==23851== Address 0x1c5eae58 is 7,048 bytes inside a block of size 7,050 alloc'd ==23851== at 0x4C26099: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==23851== by 0x37DD46E8: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:243) ==23851== by 0x37DD75BA: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==23851== by 0x37DD08DF: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==23851== by 0x645EA47: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==23851== by 0x6455A08: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==23851== by 0x6453FB6: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==23851== by 0x6406B68: KoDocument::openFile() (KoDocument.cpp:1501) ==23851== by 0x673061F: ??? (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6730C75: KParts::ReadOnlyPart::openUrl(KUrl const&) (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6409BAA: KoDocument::openUrl(KUrl const&) (KoDocument.cpp:1260) ==23851== by 0x63FAEAC: KoDocument::openExistingFile(KUrl const&) (KoDocument.cpp:2603) ==23851== ==23851== Invalid read of size 8 ==23851== at 0x19877727: ??? (in /usr/lib64/libjpeg.so.62.0.0) ==23851== by 0x5FC0A26: KisHLineConstIterator::KisHLineConstIterator(KisDataManager*, int, int, int, bool) (kis_memory_leak_tracker.h:66) ==23851== by 0x2BD4C6FF: ??? ==23851== by 0x2BD4C6FF: ??? ==23851== by 0xC2F: ??? ==23851== by 0x2801614F: ??? ==23851== by 0x5FBB395: KisHLineConstIterator::~KisHLineConstIterator() (kis_memory_leak_tracker.h:66) ==23851== by 0x37DD48D4: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:247) ==23851== by 0x37DD75BA: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==23851== by 0x37DD08DF: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==23851== by 0x645EA47: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==23851== by 0x6455A08: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==23851== Address 0x1c5eae58 is 7,048 bytes inside a block of size 7,050 alloc'd ==23851== at 0x4C26099: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==23851== by 0x37DD46E8: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:243) ==23851== by 0x37DD75BA: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==23851== by 0x37DD08DF: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==23851== by 0x645EA47: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==23851== by 0x6455A08: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==23851== by 0x6453FB6: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==23851== by 0x6406B68: KoDocument::openFile() (KoDocument.cpp:1501) ==23851== by 0x673061F: ??? (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6730C75: KParts::ReadOnlyPart::openUrl(KUrl const&) (in /usr/lib64/libkparts.so.4.7.0) ==23851== by 0x6409BAA: KoDocument::openUrl(KUrl const&) (KoDocument.cpp:1260) ==23851== by 0x63FAEAC: KoDocument::openExistingFile(KUrl const&) (KoDocument.cpp:2603)
Running of the KisJpegTest under valgring shows different problems: ==19947== Invalid read of size 2 ==19947== at 0x569D296: exifOECFToKMDOECFStructure(std::auto_ptr<Exiv2::Value>, Exiv2::ByteOrder) (kis_exif_io.cpp:177) ==19947== by 0x56A39B6: KisExifIO::loadFrom(KisMetaData::Store*, QIODevice*) const (kis_exif_io.cpp:572) ==19947== by 0x31E06D75: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:312) ==19947== by 0x31E07F94: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==19947== by 0x31E040FA: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==19947== by 0x627AA4A: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==19947== by 0x627091A: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==19947== by 0x6269814: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==19947== by 0x405438: TestUtil::testFiles(QString const&, QStringList const&, QString const&, int) (filestest.h:71) ==19947== by 0x406007: KisJpegTest::testFiles() (kis_jpeg_test.cpp:43) ==19947== by 0x40678D: KisJpegTest::qt_metacall(QMetaObject::Call, int, void**) (kis_jpeg_test.moc:72) ==19947== by 0xBBB30CE: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (in /usr/lib64/libQtCore.so.4.7.1) ==19947== Address 0x231f83be is 10 bytes after a block of size 2,100 alloc'd ==19947== at 0x4C2683D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19947== by 0xBAC39C0: QByteArray::QByteArray(int, char) (in /usr/lib64/libQtCore.so.4.7.1) ==19947== by 0x569CC6F: exifOECFToKMDOECFStructure(std::auto_ptr<Exiv2::Value>, Exiv2::ByteOrder) (kis_exif_io.cpp:146) ==19947== by 0x56A39B6: KisExifIO::loadFrom(KisMetaData::Store*, QIODevice*) const (kis_exif_io.cpp:572) ==19947== by 0x31E06D75: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:312) ==19947== by 0x31E07F94: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==19947== by 0x31E040FA: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==19947== by 0x627AA4A: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==19947== by 0x627091A: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==19947== by 0x6269814: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==19947== by 0x405438: TestUtil::testFiles(QString const&, QStringList const&, QString const&, int) (filestest.h:71) ==19947== by 0x406007: KisJpegTest::testFiles() (kis_jpeg_test.cpp:43) ==19947== ==19947== Invalid read of size 2 ==19947== at 0x569D2B0: exifOECFToKMDOECFStructure(std::auto_ptr<Exiv2::Value>, Exiv2::ByteOrder) (kis_exif_io.cpp:177) ==19947== by 0x56A39B6: KisExifIO::loadFrom(KisMetaData::Store*, QIODevice*) const (kis_exif_io.cpp:572) ==19947== by 0x31E06D75: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:312) ==19947== by 0x31E07F94: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==19947== by 0x31E040FA: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==19947== by 0x627AA4A: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==19947== by 0x627091A: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==19947== by 0x6269814: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==19947== by 0x405438: TestUtil::testFiles(QString const&, QStringList const&, QString const&, int) (filestest.h:71) ==19947== by 0x406007: KisJpegTest::testFiles() (kis_jpeg_test.cpp:43) ==19947== by 0x40678D: KisJpegTest::qt_metacall(QMetaObject::Call, int, void**) (kis_jpeg_test.moc:72) ==19947== by 0xBBB30CE: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (in /usr/lib64/libQtCore.so.4.7.1) ==19947== Address 0x231f83bc is 8 bytes after a block of size 2,100 alloc'd ==19947== at 0x4C2683D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19947== by 0xBAC39C0: QByteArray::QByteArray(int, char) (in /usr/lib64/libQtCore.so.4.7.1) ==19947== by 0x569CC6F: exifOECFToKMDOECFStructure(std::auto_ptr<Exiv2::Value>, Exiv2::ByteOrder) (kis_exif_io.cpp:146) ==19947== by 0x56A39B6: KisExifIO::loadFrom(KisMetaData::Store*, QIODevice*) const (kis_exif_io.cpp:572) ==19947== by 0x31E06D75: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:312) ==19947== by 0x31E07F94: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==19947== by 0x31E040FA: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==19947== by 0x627AA4A: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==19947== by 0x627091A: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==19947== by 0x6269814: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==19947== by 0x405438: TestUtil::testFiles(QString const&, QStringList const&, QString const&, int) (filestest.h:71) ==19947== by 0x406007: KisJpegTest::testFiles() (kis_jpeg_test.cpp:43) ==19947== ==19947== Invalid read of size 1 ==19947== at 0xBBDEFFE: ??? (in /usr/lib64/libQtCore.so.4.7.1) ==19947== by 0xBB05EBB: QString::fromUtf16(unsigned short const*, int) (in /usr/lib64/libQtCore.so.4.7.1) ==19947== by 0x569E397: deviceSettingDescriptionExifToKMD(std::auto_ptr<Exiv2::Value>) (kis_exif_io.cpp:249) ==19947== by 0x56A3C9C: KisExifIO::loadFrom(KisMetaData::Store*, QIODevice*) const (kis_exif_io.cpp:576) ==19947== by 0x31E06D75: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:312) ==19947== by 0x31E07F94: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==19947== by 0x31E040FA: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==19947== by 0x627AA4A: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==19947== by 0x627091A: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==19947== by 0x6269814: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==19947== by 0x405438: TestUtil::testFiles(QString const&, QStringList const&, QString const&, int) (filestest.h:71) ==19947== by 0x406007: KisJpegTest::testFiles() (kis_jpeg_test.cpp:43) ==19947== Address 0x23600208 is 0 bytes after a block of size 456 alloc'd ==19947== at 0x4C2683D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19947== by 0xBAC3C9C: QByteArray::resize(int) (in /usr/lib64/libQtCore.so.4.7.1) ==19947== by 0x569E059: deviceSettingDescriptionExifToKMD(std::auto_ptr<Exiv2::Value>) (kis_exif_io.cpp:232) ==19947== by 0x56A3C9C: KisExifIO::loadFrom(KisMetaData::Store*, QIODevice*) const (kis_exif_io.cpp:576) ==19947== by 0x31E06D75: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:312) ==19947== by 0x31E07F94: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==19947== by 0x31E040FA: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==19947== by 0x627AA4A: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==19947== by 0x627091A: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==19947== by 0x6269814: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==19947== by 0x405438: TestUtil::testFiles(QString const&, QStringList const&, QString const&, int) (filestest.h:71) ==19947== by 0x406007: KisJpegTest::testFiles() (kis_jpeg_test.cpp:43) ==19947== ==19947== Invalid read of size 1 ==19947== at 0xBBDF020: ??? (in /usr/lib64/libQtCore.so.4.7.1) ==19947== by 0xBB05EBB: QString::fromUtf16(unsigned short const*, int) (in /usr/lib64/libQtCore.so.4.7.1) ==19947== by 0x569E397: deviceSettingDescriptionExifToKMD(std::auto_ptr<Exiv2::Value>) (kis_exif_io.cpp:249) ==19947== by 0x56A3C9C: KisExifIO::loadFrom(KisMetaData::Store*, QIODevice*) const (kis_exif_io.cpp:576) ==19947== by 0x31E06D75: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:312) ==19947== by 0x31E07F94: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==19947== by 0x31E040FA: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==19947== by 0x627AA4A: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==19947== by 0x627091A: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==19947== by 0x6269814: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==19947== by 0x405438: TestUtil::testFiles(QString const&, QStringList const&, QString const&, int) (filestest.h:71) ==19947== by 0x406007: KisJpegTest::testFiles() (kis_jpeg_test.cpp:43) ==19947== Address 0x23600209 is 1 bytes after a block of size 456 alloc'd ==19947== at 0x4C2683D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19947== by 0xBAC3C9C: QByteArray::resize(int) (in /usr/lib64/libQtCore.so.4.7.1) ==19947== by 0x569E059: deviceSettingDescriptionExifToKMD(std::auto_ptr<Exiv2::Value>) (kis_exif_io.cpp:232) ==19947== by 0x56A3C9C: KisExifIO::loadFrom(KisMetaData::Store*, QIODevice*) const (kis_exif_io.cpp:576) ==19947== by 0x31E06D75: KisJPEGConverter::decode(KUrl const&) (kis_jpeg_converter.cc:312) ==19947== by 0x31E07F94: KisJPEGConverter::buildImage(KUrl const&) (kis_jpeg_converter.cc:432) ==19947== by 0x31E040FA: KisJPEGImport::convert(QByteArray const&, QByteArray const&) (kis_jpeg_import.cc:72) ==19947== by 0x627AA4A: CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (KoFilterChainLink.cpp:90) ==19947== by 0x627091A: KoFilterChain::invokeChain() (KoFilterChain.cpp:94) ==19947== by 0x6269814: KoFilterManager::importDocument(QString const&, QString const&, KoFilter::ConversionStatus&) (KoFilterManager.cpp:170) ==19947== by 0x405438: TestUtil::testFiles(QString const&, QStringList const&, QString const&, int) (filestest.h:71) ==19947== by 0x406007: KisJpegTest::testFiles() (kis_jpeg_test.cpp:43)
It depends on the image used for the test. Changing the image generates your backtraces
This bug is probably related: http://code.google.com/p/chromium/issues/detail?id=72399
The bug is in libjpeg6.2. The same error appears in ImageMagick's 'display' on openSUSE 11.4. Tested with Ubunto 11.10 + libjpeg8 -- works fine, no errors. So slosing the bug.