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

Issue 1619363002: Add compile time checks against longs being used in IPC structs on 32 bit Android. (Closed)

Created:
4 years, 11 months ago by jam
Modified:
4 years, 10 months ago
Reviewers:
Tom Sepez, hartmanng
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, yusukes+watch_chromium.org, tzik, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, nhiroki, nona+watch_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, cc-bugs_chromium.org, James Su, kinuko+fileapi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add compile time checks against longs being used in IPC structs on 32 bit Android. long is 4 bytes in 32 bit builds and 8 bytes in 64 bit builds so we don't want to send it between 32 and 64 bit processes. We can't remove the long IPC traits completely since types like uint64_t also use the long traits on Windows and 64 bit POSIX. So keep the traits for these platforms but remove it for others. This ensures that longs aren't sent over IPC between 32 and 64 bit configs since the 32 bit build would have a compile error. Also remove the size_t methods from Pickle. We can't add compile time checks for that since it's a typedef. A clang plugin will catch those cases. BUG=581409 Committed: https://crrev.com/03d8a78d7333f1cce537596e4513356dbe2032fc Cr-Commit-Position: refs/heads/master@{#374707}

Patch Set 1 : content_shell works #

Patch Set 2 : chrome works too #

Patch Set 3 : fix long #

Patch Set 4 : remove size_t's based on auditing #

Patch Set 5 : merge #

Patch Set 6 : one more per Dmitry #

Total comments: 3

Patch Set 7 : merge #

Patch Set 8 : merge #

Patch Set 9 : remove ReadSizeT & WriteSizeT #

Patch Set 10 : remove ReadSizeT & WriteSizeT #

Patch Set 11 : merge #

Patch Set 12 : fixes #

Patch Set 13 : merge #

Patch Set 14 : fixes (all green) #

Patch Set 15 : remove long traits on 32 bit android #

Patch Set 16 : merge #

Patch Set 17 : update #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -68 lines) Patch
M base/pickle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +5 lines, -15 lines 0 comments Download
M base/pickle.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -12 lines 0 comments Download
M base/pickle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +20 lines, -33 lines 0 comments Download
M ipc/ipc_message_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +17 lines, -4 lines 2 comments Download
M ipc/ipc_message_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +7 lines, -4 lines 0 comments Download

Messages

Total messages: 77 (54 generated)
Dmitry Skiba
BTW, I commented out ParamTraits specializations for "long" and "unsigned long" (which are as bad ...
4 years, 11 months ago (2016-01-22 23:36:04 UTC) #8
Dmitry Skiba
^ Please see comment above.
4 years, 11 months ago (2016-01-22 23:40:17 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1619363002/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1619363002/190001
4 years, 11 months ago (2016-01-27 16:15:19 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/13567) android_chromium_gn_compile_dbg on ...
4 years, 11 months ago (2016-01-27 16:18:45 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1619363002/210001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1619363002/210001
4 years, 11 months ago (2016-01-27 16:18:53 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1619363002/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1619363002/230001
4 years, 11 months ago (2016-01-27 17:15:45 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1619363002/250001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1619363002/250001
4 years, 11 months ago (2016-01-27 17:37:14 UTC) #35
jam
Dana: base & cc Tom: everything else I'm still awaiting final confirmation that this is ...
4 years, 11 months ago (2016-01-27 17:38:19 UTC) #36
Tom Sepez
Its going to take me some time to prove to myself that none of the ...
4 years, 11 months ago (2016-01-27 18:23:21 UTC) #37
jam
https://codereview.chromium.org/1619363002/diff/250001/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/1619363002/diff/250001/base/pickle.cc#newcode100 base/pickle.cc:100: *result = base::checked_cast<long>(result_int64); On 2016/01/27 18:23:20, Tom Sepez wrote: ...
4 years, 11 months ago (2016-01-27 18:42:55 UTC) #38
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-27 18:48:14 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1619363002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1619363002/270001
4 years, 10 months ago (2016-01-28 17:16:22 UTC) #42
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-01-28 19:18:43 UTC) #44
Peter Kasting
The concerns I expressed on https://codereview.chromium.org/1671403002/ also apply here. Please do not remove size_ts from ...
4 years, 10 months ago (2016-02-09 00:56:30 UTC) #58
jabdelmalek
On 2016/02/09 00:56:30, Peter Kasting wrote: > The concerns I expressed on https://codereview.chromium.org/1671403002/ also > ...
4 years, 10 months ago (2016-02-09 01:00:47 UTC) #59
jam
Tom: ptal. This change is now reduced a lot, since I moved the size_t and ...
4 years, 10 months ago (2016-02-10 17:02:14 UTC) #66
Tom Sepez
lgtm https://codereview.chromium.org/1619363002/diff/810001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/1619363002/diff/810001/ipc/ipc_message_utils.h#newcode196 ipc/ipc_message_utils.h:196: #if defined(OS_WIN) || defined(OS_LINUX) || defined(ARCH_CPU_ARM64) nit: you ...
4 years, 10 months ago (2016-02-10 18:00:07 UTC) #67
jam
thanks for all these reviews https://codereview.chromium.org/1619363002/diff/810001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/1619363002/diff/810001/ipc/ipc_message_utils.h#newcode196 ipc/ipc_message_utils.h:196: #if defined(OS_WIN) || defined(OS_LINUX) ...
4 years, 10 months ago (2016-02-10 18:19:41 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1619363002/810001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1619363002/810001
4 years, 10 months ago (2016-02-10 18:21:10 UTC) #70
commit-bot: I haz the power
Committed patchset #17 (id:810001)
4 years, 10 months ago (2016-02-10 20:13:53 UTC) #72
hartmanng
I believe this broke Android x64 Builder (dbg) https://build.chromium.org/p/chromium.android/builders/Android%20x64%20Builder%20%28dbg%29 - specifically https://build.chromium.org/p/chromium.android/builders/Android%20x64%20Builder%20%28dbg%29/builds/2600 [1299/35202] CXX obj/components/webcrypto/webcrypto/util.o ...
4 years, 10 months ago (2016-02-10 22:29:38 UTC) #74
jam
On 2016/02/10 22:29:38, hartmanng wrote: > I believe this broke Android x64 Builder (dbg) > ...
4 years, 10 months ago (2016-02-10 22:47:39 UTC) #75
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:30:38 UTC) #77
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/03d8a78d7333f1cce537596e4513356dbe2032fc
Cr-Commit-Position: refs/heads/master@{#374707}

Powered by Google App Engine
This is Rietveld 408576698