[Qt-interest] Static destructors errors

Thiago Macieira thiago at kde.org
Fri Oct 16 22:33:11 CEST 2009


Em Sexta-feira 16. Outubro 2009, às 22.19.21, marc at mferland.net escreveu:
> ==6720== Invalid read of size 4
> ==6720==    at 0x004b3f66: QBasicAtomicInt::deref() (qatomic_x86_64.h:133)
> ==6720==    by 0x004d57ee: QList<QString>::~QList() (qlist.h:533)
> ==6720==    by 0x004d555f: QStringList::~QStringList() (qstringlist.h:67)
> ==6720==    by 0x17a36bbf: __cxa_finalize (in /lib64/libc-2.10.1.so)
> ==6720==    by 0x05960765: ??? (in  
> /home/marc/devG3/trunk/lib/libparamsys.so.1.0.0)
> ==6720==    by 0x059eecb0: ??? (in  
> /home/marc/devG3/trunk/lib/libparamsys.so.1.0.0)
> ==6720==    by 0x17a367f1: exit (in /lib64/libc-2.10.1.so)
> ==6720==    by 0x17a1ea33: ??? (below main:0)
> ==6720==    Address 0x8d8c9c0 is 0 bytes inside a block of size 56 free'd
> ==6720==    at 0x04a0633d: free (vg_replace_malloc.c:323)
> ==6720==    by 0x004d6281: QList<QString>::free(QListData::Data*)  
> (qlist.h:562)
> ==6720==    by 0x004d581b: QList<QString>::~QList() (qlist.h:534)
> ==6720==    by 0x004d555f: QStringList::~QStringList() (qstringlist.h:67)
> ==6720==    by 0x17a36bbf: __cxa_finalize (in /lib64/libc-2.10.1.so)
> ==6720==    by 0x0546a505: ??? (in
>  /home/marc/devG3/trunk/lib/libflc.so.1.0.0) ==6720==    by 0x054924a0: ???
>  (in /home/marc/devG3/trunk/lib/libflc.so.1.0.0) ==6720==    by 0x17a367f1:
>  exit (in /lib64/libc-2.10.1.so)
> ==6720==    by 0x17a1ea33: ??? (below main:0)
> 
> Here the deref function reads 4 bytes from a previously freed  
> QStringList... pretty strange!
> 

That's the source of your bug.

Try doing that with a debug build of your libraries.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14     San Francisco, California: Nov 2 - 4
      http://qt.nokia.com/qtdevdays2009
-------------- 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/20091016/7e4b34cf/attachment.bin 


More information about the Qt-interest-old mailing list