[Qt-interest] Analyze memory errors

Thiago Macieira thiago at kde.org
Fri Jul 8 10:53:06 CEST 2011


On Friday, 8 de July de 2011 10:08:06 Linos wrote:
>    1: memcpy in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
>    2: QListData::insert(int) in /usr/lib/libQtCore.so.4.7.3

> I think that happens when i use QList::insert method.
> 
> This is noise and can be ignored or this is reporting a problem in QList?

It's not noise. Whether it can be ignored or not, it depends on what exactly 
that memcpy is doing and how your libc reacts to it. The C standard says it's 
undefined behaviour to mempcy with overlapping regions.

I can't find memcpy in QListData::insert, but it does call append() and 
QListData::append does have a memcpy.

I've just sent a patch to be applied to fix this. You don't need to report a 
bug.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110708/14dea804/attachment.bin 


More information about the Qt-interest-old mailing list