Details
-
Bug
-
Resolution: Cannot Reproduce
-
P1: Critical
-
None
-
5.3.0, 5.3.1
-
Linux
Description
This happens also with Qt 5.3.1 with a websocket backend service on high-load.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7907dde in QHostAddress::QHostAddress(QHostAddress const&) ()
from /home/juhapekka/Qt5.3.0/5.3/gcc_64/lib/libQt5Network.so.5
(gdb) bt
#0 0x00007ffff7907dde in QHostAddress::QHostAddress(QHostAddress const&) ()
from /home/juhapekka/Qt5.3.0/5.3/gcc_64/lib/libQt5Network.so.5
#1 0x00007ffff792aad4 in QAbstractSocket::peerAddress() const ()
from /home/juhapekka/Qt5.3.0/5.3/gcc_64/lib/libQt5Network.so.5
#2 0x00007ffff7bbe75a in ?? ()
from /home/juhapekka/Qt5.3.0/5.3/gcc_64/lib/libQt5WebSockets.so.5
#3 0x00007ffff7bbc14d in QWebSocket::peerAddress() const ()
from /home/juhapekka/Qt5.3.0/5.3/gcc_64/lib/libQt5WebSockets.so.5
I found that the most obvious reason for it is
#define QT_ENSURE_PARSED(a) \
do
while (0)
https://qt.gitorious.org/qt/qt/source/57756e72adf2081137b97f0e689dd16c770d10b1
:src/network/kernel/qhostaddress.cpp#L61
Which is lacking a null pointer check.
For example it is used here:
For example it is used in here where if the this or other are NULL it will
cause a crash.
https://qt.gitorious.org/qt/qt/source/57756e72adf2081137b97f0e689dd16c770d10b1
:src/network/kernel/qhostaddress.cpp#L818