Opened 11 years ago

Closed 11 years ago

#5839 closed Bugs (fixed)

thread.cpp: ThreadProxy leaks on exceptions

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

Description

If something goes wrong in ThreadProxy (such as fetching the return value), the ThreadProxyData could be leaked.

DWORD WINAPI ThreadProxy(LPVOID args)
{
    ThreadProxyData* data=reinterpret_cast<ThreadProxyData*>(args);
    DWORD ret=data->start_address_(data->arglist_);
    delete data;
    return ret;
}

Change History (5)

comment:1 by Jeffrey Walton <noloader@…>, 11 years ago

Component: Nonethread
Owner: set to Anthony Williams

comment:2 by viboes, 11 years ago

Cc: viboes added
Owner: changed from Anthony Williams to viboes
Status: newassigned

Where exactly is the memory leak?

comment:3 by viboes, 11 years ago

Oh, I see now. The use function can throw :(

I will try to take care of this soon.

Last edited 11 years ago by viboes (previous) (diff)

comment:4 by viboes, 11 years ago

Milestone: To Be DeterminedBoost 1.49.0

Committed in trunk at #75860

comment:5 by viboes, 11 years ago

Resolution: fixed
Status: assignedclosed

Committed in release at #76345

Note: See TracTickets for help on using tickets.