Modify

Opened 6 years ago

Closed 6 years ago

#5826 closed Bugs (fixed)

threads.cpp: resource leak on threads creation failure

Reported by: noloader@… Owned by: viboes
Milestone: Boost 1.49.0 Component: thread
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

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)

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by Jeffrey Walton <noloader@…>

Component: Nonethread
Owner: set to Anthony Williams

comment:2 Changed 6 years ago by viboes

I will take care of it soon.

comment:3 Changed 6 years ago by viboes

Milestone: To Be DeterminedBoost 1.49.0
Owner: changed from Anthony Williams to viboes
Status: newassigned

Committed in trunk at #75860

comment:4 Changed 6 years ago by viboes

Resolution: fixed
Status: assignedclosed

Committed in release at #76345

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.