Bug 20949 - [4.0/4.1 Regression] misscompilation of konqueror, artsd, STLport, libstdc++, ...
Summary: [4.0/4.1 Regression] misscompilation of konqueror, artsd, STLport, libstdc++,...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on: 20973
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-11 14:38 UTC by Pawel Sikora
Modified: 2005-07-23 22:49 UTC (History)
8 users (show)

See Also:
Host: i686-pld-linux
Target: i686-pld-linux
Build: i686-pld-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2005-04-11 14:38:07 UTC
******************************************************************************

[1] konqueror (kdebase-3.4.0).

(gdb) bt
#0  ~QIconSet (this=0x8209614) at qshared.h:50

~QIconSet (this=0x8209614) at qshared.h:50
50          bool deref()        { return !--count; }

(gdb) print this
$1 = (QIconSet * const) 0x8209614
(gdb) print *this
$2 = {_vptr.QIconSet = 0x41048ba8, d = 0x5}

It looks as if "d" pointer was corrupted in toplevel.

#1  0x4068cc51 in ~KGuiItem (this=0xbfffdbe4) at kguiitem.cpp:109
#2  0x400a1ce5 in ~QPair (this=0xbfffdbe4) at konq_mainwindow.cc:3683
#3  0x400727ea in KonqMainWindow::initActions (this=0x812af98)
    at konq_mainwindow.cc:3922
#4  0x4008b330 in KonqMainWindow (this=0x812af98, initialURL=@0xbfffef84,
    openInitialURL=false, name=0x29 <Address 0x29 out of bounds>,
    xmluiFile=@0x29) at konq_mainwindow.cc:217
(...)

Known workaround:
http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/kdebase-gcc4-konq_mainwindow.patch?rev=1.3

******************************************************************************

[2] arts-1.4.0

Program received signal SIGSEGV, Segmentation fault.
0x404f7405 in __gnu_cxx::__pool<true>::_M_reclaim_block ()
from /usr/lib/libstdc++.so.6

(gdb) bt
#0  0x404f7405 in __gnu_cxx::__pool<true>::_M_reclaim_block () from
/usr/lib/libstdc++.so.6
#1  0x08104928 in ?? ()
#2  0x0810492c in ?? ()
#3  0x00000000 in ?? ()
#4  0xbffff4d4 in ?? ()
#5  0xbffff4c8 in ?? ()
#6  0x00000000 in ?? ()
#7  0xbffff580 in ?? ()
#8  0x4006c8a0 in virtual thunk to Arts::GSLPlayObject_base::_defaultPortsOut()
    const () from /usr/lib/libsoundserver_idl.so.1
#9  0x4008ae60 in Arts::SampleStorageEntry_base::_IID ()
    from /usr/lib/libsoundserver_idl.so.1
#10 0x08104928 in ?? ()
#11 0x00000004 in ?? ()
#12 0x080ff100 in ?? ()
#13 0x081618ac in ?? ()
#14 0x081070bd in ?? ()
#15 0x081070f0 in ?? ()
#16 0xbffff4c8 in ?? ()
#17 0xbffff4b0 in ?? ()
#18 0xbffff4c8 in ?? ()
#19 0xbffff4b0 in ?? ()
#20 0x40061d49 in Arts::SoundServerStartup_base::_fromString ()
    from /usr/lib/libsoundserver_idl.so.1
#21 0x00000001 in ?? ()
#22 0x08073240 in vtable for Arts::ObjectReference ()
#23 0x080b902c in ?? ()
#24 0x0000001c in ?? ()
#25 0x081048d8 in ?? ()
#26 0x081048dc in ?? ()
#27 0x081048dc in ?? ()
#28 0x08073240 in vtable for Arts::ObjectReference ()
#29 0x0811634c in ?? ()
#30 0x0000001c in ?? ()
#31 0x08104928 in ?? ()
#32 0x0810492c in ?? ()
#33 0x0810492c in ?? ()
#34 0xbffff520 in ?? ()
#35 0x00000000 in ?? ()
#36 0xbffff508 in ?? ()
#37 0x0805e5e8 in Arts::SoundServerStartup_impl::cleanReference (this=0x8163ee0)
    at soundserver.h:1376
#38 0x0805ebda in Arts::SoundServerStartup_impl::lock (this=0x8163ee0)
    at soundserverstartup_impl.cc:78
#39 0x0805d51c in main (argc=1, argv=0xbffff784) at soundserver.h:2082

It may be related to PR19265

******************************************************************************

[3] STLport-4.6.2 (used by openoffice-1.1.3)

OpenOffice's open-file dialog closes immediately after it was launched.
This behavior came with rebuilded STLport.
It works fine with gcc-3.4, 3.3 and some earlier 4.0-snaps.
I will do a bsearch in free time.

******************************************************************************
Comment 1 Andrew Pinski 2005-04-11 14:44:33 UTC
Well without a test, there is still nothing we can do anyways because they could be invoking undefined 
behavior :).
Also do they fail when compiled with -O0?
Comment 2 Pawel Sikora 2005-04-11 15:58:02 UTC
(In reply to comment #1) 
> Well without a test, there is still nothing we can do anyways because they 
could be invoking undefined  
> behavior :). 
> Also do they fail when compiled with -O0? 
 
arts crashes with -O0. 
 
Program received signal SIGSEGV, Segmentation fault. 
0x406fc405 in __gnu_cxx::__pool<true>::_M_reclaim_block () 
from /usr/lib/libstdc++.so.6 
 
(gdb) bt 
#0  0x406fc405 in __gnu_cxx::__pool<true>::_M_reclaim_block () 
    from /usr/lib/libstdc++.so.6 
#1  0xbffff538 in ?? () 
#2  0x40014280 in _dl_runtime_resolve () from /lib/ld-linux.so.2 
#3  0x40063efd in __gnu_cxx::__mt_alloc<std::string, 
                  __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> > 
               ::deallocate (this=0xbffff2ac, __p=0x81058d8, __n=1) 
               at mt_allocator.h:746 
#4  0x40063f36 in std::_Vector_base<std::string, std::allocator<std::string> > 
               ::_M_deallocate (this=0xbffff2ac, __p=0x81058d8, __n=1) 
               at stl_vector.h:123 
#5  0x40063f71 in ~_Vector_base (this=0xbffff2ac) at stl_vector.h:109 
#6  0x40063fe1 in ~vector (this=0xbffff2ac) at stl_vector.h:273 
#7  0x40064013 in ~ObjectReference (this=0xbffff2a0) at reference.h:48 
#8  0x40055244 in Arts::SoundServerStartup_base::_fromString 
               (objectref=@0xbffff334) at soundserver.cc:2545 
#9  0x080644d4 in SoundServerStartup (this=0xbffff314, r=@0xbffff31c) 
               at soundserver.h:1376 
#10 0x0805585b in Arts::SoundServerStartup_impl::cleanReference 
               (this=0x8164cf0)  at soundserverstartup_impl.cc:54 
#11 0x080559a1 in Arts::SoundServerStartup_impl::lock (this=0x8164cf0) 
               at soundserverstartup_impl.cc:78 
#12 0x0805e080 in Arts::SoundServerStartup::lock (this=0xbffff4a8) 
               at soundserver.h:2082 
#13 0x080561d2 in main (argc=65, argv=0x8614c381) at artsd.cc:293 
 
kdebase and stlport not recompiled yet. 
 
Comment 3 Andrew Pinski 2005-04-11 17:12:12 UTC
http://gcc.gnu.org/ml/gcc/2005-04/msg00514.html
Comment 4 Pawel Sikora 2005-04-11 22:38:57 UTC
(In reply to comment #1)
> Well without a test, there is still nothing we can do anyways because they
could be invoking undefined 
> behavior :).
> Also do they fail when compiled with -O0?

Konqueror works fine with -O0 and crashes with -O1 (without Dirk Mueller's hack).
With Dirk's hack konq. works with -O2.
The bug occurs in KonqMainWindow::initActions() body.
What kind of debug info do You need? tree-dumps for -O0/1?
Comment 5 Jason Merrill 2005-04-12 07:00:20 UTC
Subject: Re:  [4.0/4.1 Regression] misscompilation of
 konqueror, artsd, STLport, libstdc++, ...

On 11 Apr 2005 22:38:59 -0000, "pluto at pld-linux dot org" <gcc-bugzilla@gcc.gnu.org> wrote:

> What kind of debug info do You need? tree-dumps for -O0/1?

We need reduced testcases that reproduce the bug(s).  Preprocessed source
for objects that are being miscompiled and a note showing the
miscompilation on the tree dump would also work.

Basically, we need to know what's going wrong before we can figure out
why.

Jason
Comment 6 Andrew Pinski 2005-04-12 17:34:20 UTC
20973 is the bug for konqueror.
Comment 7 Mark Mitchell 2005-04-17 02:51:41 UTC
This bug report contains no information about reproducing the problems, or even
any evidence that these are in fact compiler bugs, rather than bugs in the
application code.  Closing as INVALID.

If additional information becomes avaialable suggesting that is indeed a
compiler bug, please file that as a new bug.

PR 20973 remains open, as it does have information about a bug in the
compilation of konqueror.