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

Issue 1372153002: Detecting and fixing stringprintf.h format bugs (Closed)

Created:
5 years, 2 months ago by brucedawson
Modified:
5 years, 2 months ago
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, maxbogue+watch_chromium.org, qsr+mojo_chromium.org, zea+watch_chromium.org, tzik, viettrungluu+watch_chromium.org, rickyz+watch_chromium.org, nhiroki, abarth-chromium, plaree+watch_chromium.org, Aaron Boodman, darin-cc_chromium.org, yzshen+watch_chromium.org, pvalenzuela+watch_chromium.org, chromium-apps-reviews_chromium.org, darin (slow to review), ben+mojo_chromium.org, kinuko+fileapi, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Detecting and fixing stringprintf.h format bugs The print functions in stringprintf.h were not annotated for /analyze so 13 Windows specific format-string bugs accumulated. This annotates the functions so that the /analyze builder will find the problems and fixes the bugs. R=thestig@chromium.org,wfh@chromium.org,jam@chromium.org Skipping wstring presubmit checks - no new wstring usage is added NOPRESUBMIT=true BUG=427616 Committed: https://crrev.com/5604a11d546e02859db5dc75af72ce27bc14c158 Cr-Commit-Position: refs/heads/master@{#352659}

Patch Set 1 #

Patch Set 2 : Fixed four mismatches that I missed #

Total comments: 10

Patch Set 3 : Code review changes #

Patch Set 4 : Restoring lost change #

Patch Set 5 : Fixing one more bug #

Total comments: 1

Patch Set 6 : Comment to demonstrate usage of PRIsFP #

Patch Set 7 : Moving PRIsFP #

Patch Set 8 : Separate #if defined blocks. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -32 lines) Patch
M base/files/file_path.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M base/memory/shared_memory_win.cc View 1 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/strings/stringprintf.h View 1 2 2 chunks +28 lines, -13 lines 0 comments Download
M chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M content/common/sandbox_win.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M ipc/handle_win.cc View 1 3 4 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_message_utils.cc View 1 3 4 1 chunk +1 line, -1 line 0 comments Download
M mojo/fetcher/network_fetcher.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M sync/engine/model_type_worker.cc View 1 2 3 4 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 38 (9 generated)
brucedawson
I ran /analyze with some extra annotations over the weekend and found thirteen bugs. They ...
5 years, 2 months ago (2015-09-28 17:27:56 UTC) #1
jam
On 2015/09/28 17:27:56, brucedawson wrote: > I ran /analyze with some extra annotations over the ...
5 years, 2 months ago (2015-09-28 20:25:04 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1372153002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1372153002/1
5 years, 2 months ago (2015-09-28 20:42:50 UTC) #5
brucedawson
Added thestig@ for review of base changes. I also added four fixes to one line ...
5 years, 2 months ago (2015-09-28 20:52:20 UTC) #7
Will Harris
only reviewed content/common/sandbox_win.cc https://codereview.chromium.org/1372153002/diff/20001/content/common/sandbox_win.cc File content/common/sandbox_win.cc (right): https://codereview.chromium.org/1372153002/diff/20001/content/common/sandbox_win.cc#newcode227 content/common/sandbox_win.cc:227: static uint64_t s_session_id = 0; This ...
5 years, 2 months ago (2015-09-29 00:29:17 UTC) #8
Lei Zhang
https://codereview.chromium.org/1372153002/diff/20001/base/strings/stringprintf.h File base/strings/stringprintf.h (right): https://codereview.chromium.org/1372153002/diff/20001/base/strings/stringprintf.h#newcode10 base/strings/stringprintf.h:10: #ifdef _MSC_VER Check against COMPILER_MSVC instead? This is something ...
5 years, 2 months ago (2015-09-29 03:16:17 UTC) #9
brucedawson
Thanks for the feedback. I'll put up another CL momentarily. https://codereview.chromium.org/1372153002/diff/20001/base/strings/stringprintf.h File base/strings/stringprintf.h (right): https://codereview.chromium.org/1372153002/diff/20001/base/strings/stringprintf.h#newcode10 ...
5 years, 2 months ago (2015-09-29 21:39:40 UTC) #10
Lei Zhang
https://codereview.chromium.org/1372153002/diff/20001/base/strings/stringprintf.h File base/strings/stringprintf.h (right): https://codereview.chromium.org/1372153002/diff/20001/base/strings/stringprintf.h#newcode10 base/strings/stringprintf.h:10: #ifdef _MSC_VER On 2015/09/29 21:39:39, brucedawson wrote: > On ...
5 years, 2 months ago (2015-09-29 21:42:37 UTC) #11
brucedawson
> > Yes. That is much better. It is cleaner and by defining FP_MACRO near ...
5 years, 2 months ago (2015-09-29 21:50:03 UTC) #12
brucedawson
Change should be final now. I addressed all of the code-review feedback, fixed one bug ...
5 years, 2 months ago (2015-09-30 17:09:00 UTC) #13
Will Harris
content/common/sandbox_win.cc lgtm
5 years, 2 months ago (2015-09-30 17:18:34 UTC) #14
Lei Zhang
lgtm, with more documentation: https://codereview.chromium.org/1372153002/diff/80001/base/files/file_path.h File base/files/file_path.h (right): https://codereview.chromium.org/1372153002/diff/80001/base/files/file_path.h#newcode141 base/files/file_path.h:141: #define PRIsFP "s" You should ...
5 years, 2 months ago (2015-09-30 18:35:02 UTC) #15
Lei Zhang
base/ and chrome/ lgtm, that is.
5 years, 2 months ago (2015-09-30 18:35:12 UTC) #16
brucedawson
On 2015/09/30 18:35:12, Lei Zhang wrote: > base/ and chrome/ lgtm, that is. Lei - ...
5 years, 2 months ago (2015-09-30 20:24:05 UTC) #17
Lei Zhang
On 2015/09/30 20:24:05, brucedawson wrote: > On 2015/09/30 18:35:12, Lei Zhang wrote: > > base/ ...
5 years, 2 months ago (2015-09-30 22:12:43 UTC) #18
brucedawson
Sure, that makes sense. Done. And, if somebody did change PRIsFP or StringType then the ...
5 years, 2 months ago (2015-09-30 23:02:54 UTC) #19
Lei Zhang
On 2015/09/30 23:02:54, brucedawson wrote: > Sure, that makes sense. Done. > > And, if ...
5 years, 2 months ago (2015-09-30 23:07:29 UTC) #20
brucedawson
On 2015/09/30 23:07:29, Lei Zhang wrote: > On 2015/09/30 23:02:54, brucedawson wrote: > > Sure, ...
5 years, 2 months ago (2015-09-30 23:33:33 UTC) #21
Lei Zhang
On 2015/09/30 23:33:33, brucedawson wrote: > On 2015/09/30 23:07:29, Lei Zhang wrote: > > On ...
5 years, 2 months ago (2015-09-30 23:39:46 UTC) #22
jabdelmalek
lgtm
5 years, 2 months ago (2015-09-30 23:40:46 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1372153002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1372153002/140001
5 years, 2 months ago (2015-10-01 01:04:06 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/105499)
5 years, 2 months ago (2015-10-01 01:17:32 UTC) #28
brucedawson
On 2015/10/01 01:17:32, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 2 months ago (2015-10-02 17:32:30 UTC) #29
jam
On 2015/10/02 17:32:30, brucedawson wrote: > On 2015/10/01 01:17:32, commit-bot: I haz the power wrote: ...
5 years, 2 months ago (2015-10-05 23:23:57 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1372153002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1372153002/140001
5 years, 2 months ago (2015-10-05 23:28:42 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/106881)
5 years, 2 months ago (2015-10-05 23:43:49 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1372153002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1372153002/140001
5 years, 2 months ago (2015-10-06 18:26:40 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 2 months ago (2015-10-06 19:22:12 UTC) #37
commit-bot: I haz the power
5 years, 2 months ago (2015-10-06 19:23:16 UTC) #38
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/5604a11d546e02859db5dc75af72ce27bc14c158
Cr-Commit-Position: refs/heads/master@{#352659}

Powered by Google App Engine
This is Rietveld 408576698