[MAJOR BUG] g++ 2.95.x generates invalid code for KDE 3.3.0

Matthias Kretz kretz at kde.org
Fri Sep 17 23:08:09 BST 2004


mkretz at Vorlon# uname -a                                                                                                     
Linux Vorlon 2.6.7 #1 Fri Aug 13 13:22:22 CEST 2004 i686 GNU/Linux
mkretz at Vorlon# g++-2.95 -g3 -O0 test.cpp                                                                                    
mkretz at Vorlon# ./a.out                                                                                                      
zsh: 16652 segmentation fault  ./a.out

I stripped the testcase to the bare minimum to make it crash. gdb tells the 
following when in ActiveBase::otherfunc (this=0x804a00c, i=2):
(gdb) print last_i
virtual baseclass botch

So somehow the virtual stuff get's messed up. Interestingly you can get it to 
not crash by removing the "int i3" in StreamSocket.

-- 
C'ya
        Matthias
________________________________________________________
Matthias Kretz (Germany)                          <><
http://Vir.homeip.net/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 494 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040918/4d28cada/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040918/4d28cada/attachment.sig>


More information about the kde-core-devel mailing list