Subject: [Boost-bugs] [Boost C++ Libraries] #5826: threads.cpp: resource leak on threads creation failure
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-30 02:48:05
#5826: threads.cpp: resource leak on threads creation failure
--------------------------------+-------------------------------------------
Reporter: noloader@⦠| Owner:
Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
Version: Boost 1.47.0 | Severity: Problem
Keywords: |
--------------------------------+-------------------------------------------
There's a number of reasons a thread might fail to be created, especially
on Windows CE. For example, specifying a SecurityAttributes structure or
creating more than ~20 threads will result in thread creation failure.
Index: thread.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/src/thread.cpp,v
retrieving revision 1.25
diff -r1.25 thread.cpp
57a58
> ThreadProxyData* data = new ThreadProxyData(start_address,arglist);
59,60c60,65
< new ThreadProxyData(start_address,arglist),initflag,&threadID);
< if (hthread!=0)
---
> data,initflag,&threadID);
> if (hthread==0) {
> delete data;
> return 0;
> }
> if (thrdaddr!=0)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5826> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC