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

Issue 1337223002: Fixes to possible GetLastError bugs (Closed)

Created:
5 years, 3 months ago by brucedawson
Modified:
5 years, 3 months ago
CC:
chromium-reviews, wfh+watch_chromium.org, gcasto+watchlist_chromium.org, rickyz+watch_chromium.org, vabr+watchlist_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixes to possible GetLastError bugs GetLastError needs to be called immediately after the function whose error code it is retrieving. This has been made particularly important by VS 2015 which sometimes clears the error code when allocating memory. See bug 528394 for details of the underlying issue. These changes came from code inspection that looked for patterns that appeared wrong. None of the issues look critical, although that depends on what callers do with the error codes. BUG=529981 Committed: https://crrev.com/4af09d1d3452796370999fcb6add64884257e80b Cr-Commit-Position: refs/heads/master@{#349481}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Removed some sandbox changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -6 lines) Patch
M base/debug/stack_trace_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/password_manager/password_manager_util_win.cc View 2 chunks +2 lines, -1 line 0 comments Download
M sandbox/win/src/process_thread_interception.cc View 1 2 chunks +4 lines, -0 lines 0 comments Download
M sandbox/win/src/restricted_token.cc View 2 chunks +2 lines, -1 line 0 comments Download
M sandbox/win/src/restricted_token_utils.cc View 1 chunk +2 lines, -1 line 0 comments Download
M sandbox/win/tools/launcher/launcher.cc View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
brucedawson
After being burned by one bug with calling GetLastError() too late I searched most of ...
5 years, 3 months ago (2015-09-12 00:33:56 UTC) #2
vabr (Chromium)
chrome/browser/password_manager/password_manager_util_win.cc LGTM, thanks for checking for this issue in other parts of Chromium! Cheers, Vaclav
5 years, 3 months ago (2015-09-13 11:31:02 UTC) #4
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/1337223002/diff/1/sandbox/win/src/process_thread_interception.cc File sandbox/win/src/process_thread_interception.cc (right): https://codereview.chromium.org/1337223002/diff/1/sandbox/win/src/process_thread_interception.cc#newcode281 sandbox/win/src/process_thread_interception.cc:281: if (SandboxFactory::GetTargetServices()->GetState()->InitCalled()) { On 2015/09/12 00:33:55, brucedawson wrote: > ...
5 years, 3 months ago (2015-09-14 17:17:16 UTC) #5
brucedawson
PTAL In process_thread_interception.cc could add a comment (current CL) or do nothing. https://codereview.chromium.org/1337223002/diff/1/sandbox/win/src/process_thread_interception.cc File sandbox/win/src/process_thread_interception.cc ...
5 years, 3 months ago (2015-09-14 18:59:55 UTC) #6
rvargas (doing something else)
base & sbox lgtm
5 years, 3 months ago (2015-09-14 19:30:57 UTC) #7
cpu_(ooo_6.6-7.5)
lgtm
5 years, 3 months ago (2015-09-17 19:09:55 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1337223002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1337223002/20001
5 years, 3 months ago (2015-09-17 19:40:43 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 3 months ago (2015-09-17 20:21:52 UTC) #12
commit-bot: I haz the power
5 years, 3 months ago (2015-09-17 20:22:27 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/4af09d1d3452796370999fcb6add64884257e80b
Cr-Commit-Position: refs/heads/master@{#349481}

Powered by Google App Engine
This is Rietveld 408576698