Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Issue 882001: Utility functions to interact with the NT loader's data structures and associ... (Closed)

Created:
10 years, 9 months ago by Sigurður Ásgeirsson
Modified:
9 years, 7 months ago
Reviewers:
amit, robertshield
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Utility functions to interact with the NT loader's data structures and associated tests. This is in preparation for squelching false positive crash reports during DLL load. BUG=31980 TEST=Unittests in this change. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=41289

Patch Set 1 #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+587 lines, -0 lines) Patch
A chrome_frame/crash_reporting/crash_dll.h View 1 chunk +13 lines, -0 lines 2 comments Download
A chrome_frame/crash_reporting/crash_dll.cc View 1 chunk +39 lines, -0 lines 0 comments Download
M chrome_frame/crash_reporting/crash_reporting.gyp View 2 chunks +49 lines, -0 lines 0 comments Download
A chrome_frame/crash_reporting/nt_loader.h View 1 chunk +175 lines, -0 lines 2 comments Download
A chrome_frame/crash_reporting/nt_loader.cc View 1 chunk +29 lines, -0 lines 2 comments Download
A chrome_frame/crash_reporting/nt_loader_unittest.cc View 1 chunk +282 lines, -0 lines 6 comments Download

Messages

Total messages: 7 (0 generated)
Sigurður Ásgeirsson
10 years, 9 months ago (2010-03-11 15:22:12 UTC) #1
amit
drive by lgtm http://codereview.chromium.org/882001/diff/1/3 File chrome_frame/crash_reporting/crash_dll.h (right): http://codereview.chromium.org/882001/diff/1/3#newcode9 chrome_frame/crash_reporting/crash_dll.h:9: static const wchar_t* kCrashOnLoadMode = L"CRASH_DLL_CRASH_ON_LOAD"; ...
10 years, 9 months ago (2010-03-11 16:08:51 UTC) #2
Sigurður Ásgeirsson
Thanks! http://codereview.chromium.org/882001/diff/1/3 File chrome_frame/crash_reporting/crash_dll.h (right): http://codereview.chromium.org/882001/diff/1/3#newcode9 chrome_frame/crash_reporting/crash_dll.h:9: static const wchar_t* kCrashOnLoadMode = L"CRASH_DLL_CRASH_ON_LOAD"; On 2010/03/11 ...
10 years, 9 months ago (2010-03-11 16:16:35 UTC) #3
amit
On 2010/03/11 16:16:35, Ruðrugis wrote: > Thanks! > > http://codereview.chromium.org/882001/diff/1/3 > File chrome_frame/crash_reporting/crash_dll.h (right): > ...
10 years, 9 months ago (2010-03-11 16:52:11 UTC) #4
Sigurður Ásgeirsson
On Thu, Mar 11, 2010 at 11:52 AM, <amit@chromium.org> wrote: > On 2010/03/11 16:16:35, Ruðrugis ...
10 years, 9 months ago (2010-03-11 16:57:58 UTC) #5
robertshield
LGTM, cool stuff, couple of nits http://codereview.chromium.org/882001/diff/1/7 File chrome_frame/crash_reporting/nt_loader.h (right): http://codereview.chromium.org/882001/diff/1/7#newcode137 chrome_frame/crash_reporting/nt_loader.h:137: void* LoadedImports; // ...
10 years, 9 months ago (2010-03-11 18:30:38 UTC) #6
Sigurður Ásgeirsson
10 years, 9 months ago (2010-03-11 18:40:21 UTC) #7
Thanks.

http://codereview.chromium.org/882001/diff/1/7
File chrome_frame/crash_reporting/nt_loader.h (right):

http://codereview.chromium.org/882001/diff/1/7#newcode137
chrome_frame/crash_reporting/nt_loader.h:137: void* LoadedImports;  // 0x044
On 2010/03/11 18:30:38, robertshield wrote:
> tiny nit: indent

ah, you have a good eye for indent. Will fix in an upcoming CL  as I submitted
this one on Amit's LGTM.

http://codereview.chromium.org/882001/diff/1/5
File chrome_frame/crash_reporting/nt_loader_unittest.cc (right):

http://codereview.chromium.org/882001/diff/1/5#newcode70
chrome_frame/crash_reporting/nt_loader_unittest.cc:70:
EXPECT_FALSE(OwnsCriticalSection(&cs));
On 2010/03/11 18:30:38, robertshield wrote:
> I believe this should be an ASSERT_FALSE. Reason being, that if we did still
own
> it, then the other thread would block on the EnterCriticalSection and then
we'd
> deadlock waiting for the Event to be set.

Well, the ownership of the CS is not in question here, that's quite well-defined
so it doesn't really matter whether I assert or expect, except for the little
detail that the CS will be orphaned on early exit.
What is in question here is the functionality of the OwnsCriticalSection
function, which is being tested against a well defined set of states on a CS
under test control.

http://codereview.chromium.org/882001/diff/1/5#newcode87
chrome_frame/crash_reporting/nt_loader_unittest.cc:87: EXPECT_EQ(0,
::TryEnterCriticalSection(&cs));
On 2010/03/11 18:30:38, robertshield wrote:
> ASSERT here too? should we Leave it if this succeeds or does that not matter
> terribly much?

Yeah, same deal, this is more to verify that I didn't screw up on the
posttasks...

http://codereview.chromium.org/882001/diff/1/5#newcode281
chrome_frame/crash_reporting/nt_loader_unittest.cc:281: EXPECT_EQ(1,
exceptions_handled);
On 2010/03/11 18:30:38, robertshield wrote:
> cool tests :)

Thanks, but the CRT bug is totally uncool, and it cost me a couple of hours to
work around it :(.

Powered by Google App Engine
This is Rietveld 408576698