WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
51860
LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
https://bugs.webkit.org/show_bug.cgi?id=51860
Summary
LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
Daniel Bates
Reported
2011-01-03 18:06:17 PST
If either CreateThread() or _beginthreadex() fails then we should deallocate the instance of ThreadFunctionInvocation we created.
Attachments
Patch
(1.65 KB, patch)
2011-01-03 18:08 PST
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(1.84 KB, patch)
2011-01-04 10:46 PST
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(2.43 KB, patch)
2011-01-04 10:49 PST
,
Daniel Bates
aroben
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2011-01-03 18:08:01 PST
Created
attachment 77857
[details]
Patch
Eric Seidel (no email)
Comment 2
2011-01-03 23:44:44 PST
Don't we have a cleaner way to do this?
Daniel Bates
Comment 3
2011-01-03 23:53:57 PST
(In reply to
comment #2
)
> Don't we have a cleaner way to do this?
One idea was to use OwnPtr, but I was concerned that there might be a race condition between the time we copy the data structure pointed to by param in wtfThreadEntryPoint() and when the OwnPtr goes out of scope when we reach the end of createThreadInternal(). I'll look into this some more. If you have any insight/suggestions I would appreciate it.
Daniel Bates
Comment 4
2011-01-04 10:46:58 PST
Created
attachment 77904
[details]
Patch Use OwnPtr based on a suggestion by Adam Roben for
bug #51855
Daniel Bates
Comment 5
2011-01-04 10:49:35 PST
Created
attachment 77905
[details]
Patch
Daniel Bates
Comment 6
2011-01-04 11:29:55 PST
Committed
r74983
: <
http://trac.webkit.org/changeset/74983
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug