Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 4642970720534528: Issue #1147 (Closed)

Created:
July 31, 2014, 3:32 p.m. by Eric
Modified:
Aug. 5, 2014, 1:30 p.m.
Reviewers:
Oleksandr
Visibility:
Public.

Description

Issue #1147 This should be all you need. Just check the return values for null before instantiating the managed pointer types. This code is for you. I'm not set up to replicate the defect at the moment. Download the patch and see if it works for you.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -4 lines) Patch
M installer/src/installer-lib/process.cpp View 2 chunks +7 lines, -4 lines 2 comments Download

Messages

Total messages: 4
Eric
http://codereview.adblockplus.org/4642970720534528/diff/5629499534213120/installer/src/installer-lib/process.cpp File installer/src/installer-lib/process.cpp (right): http://codereview.adblockplus.org/4642970720534528/diff/5629499534213120/installer/src/installer-lib/process.cpp#newcode21 installer/src/installer-lib/process.cpp:21: // OpenProcess does not return INVALID_HANDLE VALUE, so a ...
July 31, 2014, 3:37 p.m. (2014-07-31 15:37:08 UTC) #1
Eric
Defect fix in comment http://codereview.adblockplus.org/4642970720534528/diff/5629499534213120/installer/src/installer-lib/process.cpp File installer/src/installer-lib/process.cpp (right): http://codereview.adblockplus.org/4642970720534528/diff/5629499534213120/installer/src/installer-lib/process.cpp#newcode22 installer/src/installer-lib/process.cpp:22: if (!h) return false; OOPS! ...
July 31, 2014, 3:44 p.m. (2014-07-31 15:44:24 UTC) #2
Oleksandr
This is part of the fix, but doesn't actually fix the MSIHANDLE leakage. Thanks anyway. ...
Aug. 5, 2014, 1:13 p.m. (2014-08-05 13:13:51 UTC) #3
Eric
Aug. 5, 2014, 1:30 p.m. (2014-08-05 13:30:39 UTC) #4
On 2014/08/05 13:13:51, Oleksandr wrote:
> This is part of the fix, but doesn't actually fix the MSIHANDLE leakage.
Thanks
> anyway. You can close this.

You're welcome.

I have a suspicion about what's wrong. It would be in 'class Record'. I mocked
up a move constructor with a proxy class for that (since I did not know at the
time that we had move available). In any case, 'Record' is used to create
argument lists for dialog boxes. It's possible that the proxy-move isn't
triggering the destructor correctly.

To test this, navigate through the dialogs using a path with a different number
of dialog boxes; since you can change your mind in them, this is possible. If
the number of leaked handles matches the number of dialogs, the leak is probably
in class Record. If it is, I'll do the fix for you.

Powered by Google App Engine
This is Rietveld