Archived
This forum has been archived. Please start a new discussion on GitHub.
Bug in IceUtil::Thread
Hi
There is a race condition caused crash in IceUtil::Thread. It happens when the newly created thread exits really quick. This bug has been tested on both Win32(WindowsXP) and on Linux(Redhat 9.0).
The Thread::start() method does not retain a owning reference to the thread object before calling 'beginthread()'. Thus if the newly created thread completes very quickly, then an access violation is caused in Thread::start().
I've attached a zip file which contains both a program TestThread.cpp which will reproduce the crash, and a patch to Ice to fix the bug.
Regards
Sreeram
Tachyon Technologies
There is a race condition caused crash in IceUtil::Thread. It happens when the newly created thread exits really quick. This bug has been tested on both Win32(WindowsXP) and on Linux(Redhat 9.0).
The Thread::start() method does not retain a owning reference to the thread object before calling 'beginthread()'. Thus if the newly created thread completes very quickly, then an access violation is caused in Thread::start().
I've attached a zip file which contains both a program TestThread.cpp which will reproduce the crash, and a patch to Ice to fix the bug.
Regards
Sreeram
Tachyon Technologies
0
Comments
-
Hi Sreeram,
Thanks for the bug report, test-case and patch! I confirm you found a real bug, which won't be in the next Ice release.
Cheers,
Bernard0