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

Issue 1869433004: Fix printf formats (Closed)

Created:
4 years, 8 months ago by JF
Modified:
4 years, 8 months ago
CC:
Hannes Payer (out of office), ulan, v8-reviews_googlegroups.com, v8-x87-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix printf formats The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL: - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h. - Uses it appropriately. - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done). - Fixes a bunch of incorrect formats. R= jochen@chromium.org, bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org Committed: https://crrev.com/6ebf9fbb93d31f9be41156a3325d58704ed4933d Cr-Commit-Position: refs/heads/master@{#35365}

Patch Set 1 #

Patch Set 2 : Fix non-x64 targets. #

Patch Set 3 : x87 isn't built by default when building "all" #

Patch Set 4 : Import Chrome's format_macros.h to handle size_t properly. #

Patch Set 5 : Fix pointer format. #

Patch Set 6 : Log test pointer format sad on Windows. Empty format makes Linux sad. #

Patch Set 7 : Fix intptr_t format on OSX" #

Total comments: 2

Patch Set 8 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -257 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/arm64/simulator-arm64.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/ast/prettyprinter.h View 3 chunks +3 lines, -2 lines 0 comments Download
M src/ast/prettyprinter.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M src/base/compiler-specific.h View 1 chunk +11 lines, -0 lines 0 comments Download
A src/base/format-macros.h View 1 2 3 4 5 6 7 1 chunk +97 lines, -0 lines 0 comments Download
M src/base/logging.h View 1 chunk +3 lines, -2 lines 0 comments Download
M src/base/macros.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -15 lines 0 comments Download
M src/base/platform/platform.h View 3 chunks +12 lines, -11 lines 0 comments Download
M src/compilation-statistics.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M src/crankshaft/hydrogen-range-analysis.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/crankshaft/lithium-allocator.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/crankshaft/lithium-codegen.h View 1 chunk +1 line, -1 line 0 comments Download
M src/disassembler.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M src/global-handles.cc View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M src/heap/gc-idle-time-handler.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M src/heap/gc-tracer.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/heap/gc-tracer.cc View 1 2 3 4 5 6 3 chunks +29 lines, -29 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 6 chunks +47 lines, -49 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 2 chunks +11 lines, -12 lines 0 comments Download
M src/heap/spaces.cc View 1 2 3 4 5 6 5 chunks +6 lines, -14 lines 0 comments Download
M src/ia32/disasm-ia32.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/log.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/log.cc View 1 2 3 4 5 6 9 chunks +12 lines, -14 lines 0 comments Download
M src/log-utils.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/log-utils.cc View 1 2 3 4 1 chunk +1 line, -5 lines 0 comments Download
M src/profiler/allocation-tracker.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M src/profiler/heap-snapshot-generator.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/profiler/profile-generator.cc View 1 2 3 1 chunk +6 lines, -5 lines 0 comments Download
M src/profiler/strings-storage.h View 2 chunks +3 lines, -1 line 0 comments Download
M src/snapshot/serializer.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M src/utils.h View 3 chunks +11 lines, -30 lines 0 comments Download
M src/wasm/decoder.h View 4 chunks +8 lines, -5 lines 0 comments Download
M src/wasm/wasm-result.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/x64/disasm-x64.cc View 1 2 3 4 5 6 5 chunks +5 lines, -6 lines 0 comments Download
M src/x87/disasm-x87.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/heap/test-heap.cc View 1 2 3 4 5 6 1 chunk +10 lines, -6 lines 0 comments Download
M test/cctest/test-log.cc View 1 2 3 4 5 4 chunks +8 lines, -9 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 41 (20 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869433004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869433004/1
4 years, 8 months ago (2016-04-07 00:35:28 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_mipsel_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mipsel_compile_rel/builds/12715)
4 years, 8 months ago (2016-04-07 00:39:19 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869433004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869433004/20001
4 years, 8 months ago (2016-04-07 01:04:17 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869433004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869433004/80001
4 years, 8 months ago (2016-04-07 21:31:49 UTC) #9
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/18110)
4 years, 8 months ago (2016-04-07 21:40:52 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869433004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869433004/120001
4 years, 8 months ago (2016-04-08 01:03:19 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win64_rel_ng/builds/5555) v8_win_rel_ng on ...
4 years, 8 months ago (2016-04-08 01:12:12 UTC) #16
JF
jochen: as discussed today, I think this is now good to review (a few bots ...
4 years, 8 months ago (2016-04-08 01:26:52 UTC) #19
jochen (gone - plz use gerrit)
lgtm with comments https://codereview.chromium.org/1869433004/diff/120001/src/base/format_macros.h File src/base/format_macros.h (right): https://codereview.chromium.org/1869433004/diff/120001/src/base/format_macros.h#newcode1 src/base/format_macros.h:1: // Copyright 2016 the V8 project ...
4 years, 8 months ago (2016-04-08 01:46:55 UTC) #20
JF
https://codereview.chromium.org/1869433004/diff/120001/src/base/format_macros.h File src/base/format_macros.h (right): https://codereview.chromium.org/1869433004/diff/120001/src/base/format_macros.h#newcode1 src/base/format_macros.h:1: // Copyright 2016 the V8 project authors. All rights ...
4 years, 8 months ago (2016-04-08 05:32:21 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869433004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869433004/140001
4 years, 8 months ago (2016-04-08 05:32:36 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/13389)
4 years, 8 months ago (2016-04-08 05:36:07 UTC) #26
JF
Looks like I need moar lgtms! Sounds like bmeurer, yangguo, ahaas are a good minset.
4 years, 8 months ago (2016-04-08 05:40:07 UTC) #28
Benedikt Meurer
LGTM
4 years, 8 months ago (2016-04-08 07:11:00 UTC) #31
Yang
On 2016/04/08 07:11:00, Benedikt Meurer wrote: > LGTM lgtm
4 years, 8 months ago (2016-04-08 08:39:57 UTC) #32
Yang
On 2016/04/08 07:11:00, Benedikt Meurer wrote: > LGTM lgtm
4 years, 8 months ago (2016-04-08 08:43:57 UTC) #33
ahaas
On 2016/04/08 at 08:43:57, yangguo wrote: > On 2016/04/08 07:11:00, Benedikt Meurer wrote: > > ...
4 years, 8 months ago (2016-04-08 12:07:40 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869433004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869433004/140001
4 years, 8 months ago (2016-04-08 15:13:38 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 8 months ago (2016-04-08 15:29:52 UTC) #38
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/6ebf9fbb93d31f9be41156a3325d58704ed4933d Cr-Commit-Position: refs/heads/master@{#35365}
4 years, 8 months ago (2016-04-08 15:31:29 UTC) #40
JF
4 years, 8 months ago (2016-04-08 16:10:16 UTC) #41
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/1867383002/ by jfb@chromium.org.

The reason for reverting is: One small issue easily fixed here:
https://codereview.chromium.org/1867333003/

But it looks like MSVS 2013 doesn't like some of the formats and exists with the
unhelpful:
Stderr:
f:\dd\vctools\crt\crtw32\stdio\output.c(1125) : Assertion failed: ("Incorrect
format specifier", 0)

It's easier to revert for now, I'll dig more into the docs:
https://msdn.microsoft.com/en-us/library/56e442dc(v=vs.120).aspx
https://msdn.microsoft.com/en-us/library/tcxf1dw6(v=vs.120).aspx

And then resubmit, making sure I run these bots..

Powered by Google App Engine
This is Rietveld 408576698