[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem in ~Thread()
From: |
Dimitar Dimitrov |
Subject: |
Problem in ~Thread() |
Date: |
Fri, 2 May 2003 13:06:39 +0200 |
User-agent: |
KMail/1.5.1 |
Hi,
I think this is a bug in the Thread class and more precisely in ~Thread().
The problem is that Thread::terminate() deletes and sets Thread::priv to NULL.
If the destructor of Thread is called afterwards it tries to access
priv->_msgbuf, whithout checking whether priv == NULL, which results in a
segmentation fault.
This is exactly what happens in SocketService destructor. It calls terminate (
that is Thread::terminate() ) and then ~Thread() is called.
Regards,
Dimitar
- Problem in ~Thread(),
Dimitar Dimitrov <=