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

Issue 370943002: Don't pass a string16 to %s. (Closed)

Created:
6 years, 5 months ago by Nico
Modified:
6 years, 5 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Don't pass a string16 to %s. clang warns: ..\..\win8\delegate_execute\delegate_execute.cc(97,39) : error(clang): cannot pass object of non-trivial type 'const base::string16' (aka 'const basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >') through variadic function; call will abort at runtime [-Wnon-pod-varargs] operation.mutex().c_str(), operation.relaunch_flags()); ^ 1 error generated. How did this every work? My guess is that %s interpreted the size_ member variable at the start of string16 as C string, and since the size usually has a at least the upper byte set to 0, this ended up logging 1-2 garbage bytes. BUG=82385 NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281750

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M win8/delegate_execute/delegate_execute.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Nico
Since noone seems to look at the output of this line, maybe we can just ...
6 years, 5 months ago (2014-07-06 20:07:24 UTC) #1
Nico
+grt, Robert is apparently away. On Jul 6, 2014 1:07 PM, <thakis@chromium.org> wrote: > Reviewers: ...
6 years, 5 months ago (2014-07-08 02:57:15 UTC) #2
Nico
(actually +grt)
6 years, 5 months ago (2014-07-08 04:35:50 UTC) #3
grt (UTC plus 2)
doh! lgtm.
6 years, 5 months ago (2014-07-08 14:10:22 UTC) #4
grt (UTC plus 2)
On 2014/07/06 20:07:24, Nico (away) wrote: > Since noone seems to look at the output ...
6 years, 5 months ago (2014-07-08 14:12:12 UTC) #5
Nico
The CQ bit was checked by thakis@chromium.org
6 years, 5 months ago (2014-07-08 14:44:05 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/370943002/1
6 years, 5 months ago (2014-07-08 14:45:28 UTC) #7
commit-bot: I haz the power
6 years, 5 months ago (2014-07-08 14:48:03 UTC) #8
Message was sent while issue was closed.
Change committed as 281750

Powered by Google App Engine
This is Rietveld 408576698