Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Issue 107001: Issue 384 - UnregisterWait error handling is incorrect (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 5 months ago by bsmedberg
Modified:
12 years, 8 months ago
Reviewers:
doshimun
CC:
Ted Mielczarek
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/
Visibility:
Public.

Description

http://code.google.com/p/google-breakpad/issues/detail?id=384

ClientInfo::UnregisterWaits calls UnregisterWait (Windows API), and checks the
return value. But there is a trick of the return value of UnregisterWait:
http://msdn.microsoft.com/en-us/library/ms686870%28VS.85%29.aspx says that
if there is a callback pending on the handle, the function will unregister
the wait, return FALSE and GetLastError will have ERROR_IO_PENDING.

This means that the ClientInfo ends up with a invalid handle. When we get
to ClientInfo::~ClientInfo we try to UnregisterWaitEx again, which crashes
with an INVALID_PARAMETER exception.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
src/client/windows/crash_generation/client_info.cc View 1 chunk +5 lines, -15 lines 0 comments Download
src/client/windows/crash_generation/client_info.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2
bsmedberg
14 years, 5 months ago #1
doshimun
14 years, 5 months ago #2
LGTM. Good catch. I think some product at Google is also seeing a similar crash.
Thanks for fixing it.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted