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

Issue 1929193002: Use offsetof in ZR_HELPER_ for Clang. (Closed)

Created:
4 years, 7 months ago by krasin
Modified:
4 years, 7 months ago
Reviewers:
krasin1, xyzzyz
CC:
chromium-reviews, pcc1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use offsetof in ZR_HELPER_ for Clang. As an immediate reason for the change is that making an invalid reinterpret_cast(16) causes Control Flow Integrity and UBSan vptr sanitizers to crash on reading the vtable pointer. Ignoring this problem (by suppressing a check) would mask real failures, some of which have security consequences. Theoretically, a similar change could be made for GCC, but there's no immediate pressure to do that, as GCC does not have any type-checking subsystem for reinterpret_casts. NOTE: this patch will need to be reverted, when the github repo gets the official fix submitted by me to the internal Google repo. BUG=605933 Committed: https://crrev.com/7809c2d9948352fb73d50d3b88b45e42bcfed5cc Cr-Commit-Position: refs/heads/master@{#390568}

Patch Set 1 #

Total comments: 1

Patch Set 2 : link github and crbug issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -1 line) Patch
M third_party/protobuf/README.chromium View 1 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/protobuf/patches/0011-use-offsetof-for-clang.patch View 1 chunk +49 lines, -0 lines 0 comments Download
M third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc View 1 chunk +9 lines, -1 line 0 comments Download
M third_party/protobuf/src/google/protobuf/generated_message_reflection.h View 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (11 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/1929193002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1929193002/1
4 years, 7 months ago (2016-04-28 23:20:45 UTC) #2
krasin
4 years, 7 months ago (2016-04-28 23:26:35 UTC) #4
xyzzyz
lgtm https://codereview.chromium.org/1929193002/diff/1/third_party/protobuf/README.chromium File third_party/protobuf/README.chromium (right): https://codereview.chromium.org/1929193002/diff/1/third_party/protobuf/README.chromium#newcode95 third_party/protobuf/README.chromium:95: the internal Google repo. Please link to the ...
4 years, 7 months ago (2016-04-28 23:42:56 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1929193002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1929193002/1
4 years, 7 months ago (2016-04-28 23:50:51 UTC) #9
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 7 months ago (2016-04-28 23:50:53 UTC) #12
krasin1
I almost missed the comment to link to the github issue. Added it to README.chromium. ...
4 years, 7 months ago (2016-04-28 23:57:02 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1929193002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1929193002/20001
4 years, 7 months ago (2016-04-28 23:57:29 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-04-29 01:51:09 UTC) #18
commit-bot: I haz the power
4 years, 7 months ago (2016-04-30 17:23:37 UTC) #19
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7809c2d9948352fb73d50d3b88b45e42bcfed5cc
Cr-Commit-Position: refs/heads/master@{#390568}

Powered by Google App Engine
This is Rietveld 408576698