|
|
DescriptionImplement use_cfi_cast to optionally enable cast checks.
This is to allow launching cfi-vcal first, and follow up with additional strictness later.
BUG=626794, 464797
Committed: https://crrev.com/59d3718ac1328d46fac147720f078c53f63070cf
Cr-Commit-Position: refs/heads/master@{#404956}
Patch Set 1 #Patch Set 2 : fix gyp typo #Patch Set 3 : add a test for invalid vcall; disable cast check if CFI_CAST_CHECK is not defined #Patch Set 4 : Delete debug leftovers #
Total comments: 2
Patch Set 5 : make sure it could not be devirtualized #
Total comments: 2
Patch Set 6 : NOINLINE #
Total comments: 4
Patch Set 7 : Localize CFI_CAST_CHECK define #
Messages
Total messages: 44 (23 generated)
The CQ bit was checked by krasin@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by krasin@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full committers or once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
The CQ bit was checked by krasin@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by krasin@google.com
krasin@chromium.org changed reviewers: + dpranke@chromium.org, krasin@chromium.org, pcc@google.com
Peter, Dirk, please, review this CL. It's a step forward gradual CFI launch: we'll only launch CFI vcall check first, and follow up with unrelated-cast and derived-cast checks in the next round.
On 2016/07/09 00:01:34, krasin1 wrote: > Peter, Dirk, > > please, review this CL. It's a step forward gradual CFI launch: we'll only > launch CFI vcall check first, and follow up with unrelated-cast and derived-cast > checks in the next round. The test ToolsSanityTest.BadCast is failing. I would suggest changing that test to perform a bad vcall instead.
> > The test ToolsSanityTest.BadCast is failing. I would suggest changing that test > to perform a bad vcall instead. Yes, I completely agree. I have added ToolsSanityTest.BadVirtualCall and guarded ToolsSanityTest.BadCast with CFI_CAST_CHECK define. Please, take another look.
The CQ bit was checked by krasin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
pcc@chromium.org changed reviewers: + pcc@chromium.org
https://codereview.chromium.org/2131423002/diff/60001/base/tools_sanity_unitt... File base/tools_sanity_unittest.cc (right): https://codereview.chromium.org/2131423002/diff/60001/base/tools_sanity_unitt... base/tools_sanity_unittest.cc:378: EXPECT_DEATH(a_ptr->f(), "ILL_ILLOPN"); I'm not sure if this is quite the test we need here, because I would have expected whole-program vtable optimization to devirtualize this call (and remove the check here). If this test is passing locally for you, we should figure out why.
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
https://codereview.chromium.org/2131423002/diff/60001/base/tools_sanity_unitt... File base/tools_sanity_unittest.cc (right): https://codereview.chromium.org/2131423002/diff/60001/base/tools_sanity_unitt... base/tools_sanity_unittest.cc:378: EXPECT_DEATH(a_ptr->f(), "ILL_ILLOPN"); I've played a bit with the code, and the compiler gets confused with *reinterpret_cast<void**>(a_ptr) = *reinterpret_cast<void**>(&b); all the time (with any possible outcome: not devirtualized, devirtualized, incorrectly devirtualized). I have modified the code to make sure it could not be devirtualized. Please, take a look.
lgtm https://codereview.chromium.org/2131423002/diff/80001/base/tools_sanity_unitt... File base/tools_sanity_unittest.cc (right): https://codereview.chromium.org/2131423002/diff/80001/base/tools_sanity_unitt... base/tools_sanity_unittest.cc:375: __attribute__((noinline)) void KillVptrAndCall(A *obj) { Use NOINLINE macro here.
Peter: all done, thanks! Nico, can you please take a look? In particular, it wants your LGTM for base/tools_sanity_unittest.cc. https://codereview.chromium.org/2131423002/diff/80001/base/tools_sanity_unitt... File base/tools_sanity_unittest.cc (right): https://codereview.chromium.org/2131423002/diff/80001/base/tools_sanity_unitt... base/tools_sanity_unittest.cc:375: __attribute__((noinline)) void KillVptrAndCall(A *obj) { On 2016/07/12 18:54:28, pcc1 wrote: > Use NOINLINE macro here. Done.
The CQ bit was checked by krasin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
krasin@chromium.org changed reviewers: + thakis@chromium.org
Nico, can you please take a look? In particular, it wants your LGTM for base/tools_sanity_unittest.cc. (repeating the request, as I forgot to add your email to the list of the reviewers in the first time)
Things are looking good so far in the CQ dry run. Pending the LGTM for base/tools_sanity_unittests.cc from Nico, we should be good for the launch tomorrow.
https://codereview.chromium.org/2131423002/diff/100001/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/2131423002/diff/100001/build/common.gypi#newc... build/common.gypi:6248: 'CFI_CAST_CHECK', do we really have to globally add a define to every translation unit when the define is only used in a single cc file? could this be on the base_unittests target instead? https://codereview.chromium.org/2131423002/diff/100001/build/config/sanitizer... File build/config/sanitizers/BUILD.gn (right): https://codereview.chromium.org/2131423002/diff/100001/build/config/sanitizer... build/config/sanitizers/BUILD.gn:271: defines += [ "CFI_CAST_CHECK" ] likewise
The CQ bit was unchecked by commit-bot@chromium.org to run a CQ dry run
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
https://codereview.chromium.org/2131423002/diff/100001/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/2131423002/diff/100001/build/common.gypi#newc... build/common.gypi:6248: 'CFI_CAST_CHECK', On 2016/07/12 23:23:59, Nico wrote: > do we really have to globally add a define to every translation unit when the > define is only used in a single cc file? could this be on the base_unittests > target instead? Done. https://codereview.chromium.org/2131423002/diff/100001/build/config/sanitizer... File build/config/sanitizers/BUILD.gn (right): https://codereview.chromium.org/2131423002/diff/100001/build/config/sanitizer... build/config/sanitizers/BUILD.gn:271: defines += [ "CFI_CAST_CHECK" ] On 2016/07/12 23:23:59, Nico wrote: > likewise Done.
The CQ bit was checked by krasin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dpranke@chromium.org, pcc@chromium.org, krasin@chromium.org Link to the patchset: https://codereview.chromium.org/2131423002/#ps120001 (title: "Localize CFI_CAST_CHECK define")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by krasin@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #7 (id:120001)
Message was sent while issue was closed.
CQ bit was unchecked.
Message was sent while issue was closed.
Description was changed from ========== Implement use_cfi_cast to optionally enable cast checks. This is to allow launching cfi-vcal first, and follow up with additional strictness later. BUG=626794,464797 ========== to ========== Implement use_cfi_cast to optionally enable cast checks. This is to allow launching cfi-vcal first, and follow up with additional strictness later. BUG=626794,464797 Committed: https://crrev.com/59d3718ac1328d46fac147720f078c53f63070cf Cr-Commit-Position: refs/heads/master@{#404956} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/59d3718ac1328d46fac147720f078c53f63070cf Cr-Commit-Position: refs/heads/master@{#404956} |