Bug 166281 - Dolphin crashes on invalid ftp url
Summary: Dolphin crashes on invalid ftp url
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-11 09:07 UTC by Tommi Tervo
Modified: 2008-07-19 17:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tommi Tervo 2008-07-11 09:07:40 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc-4.3 
OS:                Linux

ulimit stack limit first (I've 8192)
press alt-l and enter ftp://foo@192.168.0.1:asdasd -> Crash

dolphin(3937)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/teve-kde4/ksocket-teve/dolphinjk3937.slave-socket"          
==3937== Stack overflow in thread 1: can't grow stack to 0xBE7FFFCC             
==3937== Can't extend stack to 0xBE7FFA60 during signal delivery for thread 1:  
==3937==   no stack segment                                                     
==3937==                                                                        
==3937== Process terminating with default action of signal 11 (SIGSEGV)         
==3937==  Access not within mapped region at address 0xBE7FFA60                 
==3937==    at 0x4A77E2F: QString::replace(QString const&, QString const&, Qt::CaseSensitivity) (in /usr/lib/libQtCore.so.4.4.0)                                
==3937== Stack overflow in thread 1: can't grow stack to 0xBE7FFFC8             
==3937==                                                                        
==3937== Process terminating with default action of signal 11 (SIGSEGV)         
==3937==  Access not within mapped region at address 0xBE7FFFC8                 
==3937==    at 0x401D220: _vgnU_freeres (in /usr/lib/valgrind/x86-linux/vgpreload_core.so)                                                                    
Program received signal SIGSEGV, Segmentation fault.
 
 
 
[Switching to Thread 0xb615e6d0 (LWP 4076)]         
0xb7486e2f in QString::replace () from /usr/lib/libQtCore.so.4
(gdb) bt                                                      
#0  0xb7486e2f in QString::replace () from /usr/lib/libQtCore.so.4
#1  0xb7487c1b in QString::normalized () from /usr/lib/libQtCore.so.4
#2  0xb74db579 in qt_nameprep () from /usr/lib/libQtCore.so.4
#3  0xb74dd06a in qt_from_ACE () from /usr/lib/libQtCore.so.4
#4  0xb74dd22c in QUrlPrivate::canonicalHost () from /usr/lib/libQtCore.so.4
#5  0xb74e16d5 in QUrlPrivate::normalized () from /usr/lib/libQtCore.so.4
#6  0xb74e1ae8 in QUrl::operator== () from /usr/lib/libQtCore.so.4
#7  0xb76f24ec in KUrl::operator== (this=0x81fedb4, _u=@0xbf4a2888)
    at /home/teve/src/kdelibs/kdecore/io/kurl.cpp:550
#8  0xb7f3ceed in DolphinView::updateView (this=0x81a31c0, url=@0xbf4a2888,
    rootUrl=@0x85cce00)
    at /home/teve/src/kdebase/apps/dolphin/src/dolphinview.cpp:439
#9  0x080723b5 in DolphinViewContainer::restoreView (this=0x81be1b8,
    url=@0xbf4a2888)
    at /home/teve/src/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:378
#10 0x08072e1f in DolphinViewContainer::qt_metacall (this=0x81be1b8,
    _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0xbf4a281c)
    at /home/teve/src/kdebase_build/apps/dolphin/src/dolphinviewcontainer.moc:115
#11 0xb752b36a in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb752b7b2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb73a6da0 in KUrlNavigator::urlChanged (this=0x81c7c18, _t1=@0xbf4a2888)
    at /home/teve/src/kdelibs_build/kfile/kurlnavigator.moc:137
#14 0xb73aa0d3 in KUrlNavigator::setUrl (this=0x81c7c18, url=@0xbf4a2a98)
    at /home/teve/src/kdelibs/kfile/kurlnavigator.cpp:1071
#15 0x08072e63 in DolphinViewContainer::setUrl (this=0x81be1b8,
Comment 1 Frank Reininghaus 2008-07-14 18:45:04 UTC
Confirmed on today's SVN trunk. Bug #166543 looks like a duplicate.
Comment 2 Peter Penz 2008-07-19 17:20:54 UTC
SVN commit 834752 by ppenz:

If an invalid URL has been set, the check whether the URL has already been entered failed because KUrl::equals() always returns false if at least one URL is invalid (even if both invalid URLs are equal). This has lead to an endless recursion in Dolphin as Dolphin relies on that invoking KUrlNavigator::setUrl() with the same URL twice does not emit 2 urlsChanged() signals.

BUG: 166543
BUG: 166281

 M  +3 -1      kurlnavigator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=834752
Comment 3 Peter Penz 2008-07-19 17:21:53 UTC
SVN commit 834753 by ppenz:

Backport of 834752 for 4.1: If an invalid URL has been set, the check whether the URL has already been entered failed because KUrl::equals() always returns false if at least one URL is invalid (even if both invalid URLs are equal). This has lead to an endless recursion in Dolphin as Dolphin relies on that invoking KUrlNavigator::setUrl() with the same URL twice does not emit 2 urlsChanged() signals.

CCBUG: 166543
CCBUG: 166281

 M  +3 -1      kurlnavigator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=834753