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

Issue 2524503002: chrome/android/intel/clang: Use --icf=safe instead of --icf=all. (Closed)

Created:
4 years, 1 month ago by Nico
Modified:
4 years, 1 month ago
Reviewers:
Reid Kleckner
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

chrome/android/intel/clang: Use --icf=safe instead of --icf=all. gold has a bug where it ignores section alignment when merging functions. This means that member functions and regular functions with the same contents can be merged even if the regular function has an odd address. In the Itanium ABI, member function pointers with an odd address denote virtual member function points, so if a non-virtual member function gets folded into an identical non-member function that happens to be at an odd address, the generated code will conclude at runtime that the call is meant to be virtual, leading to a crash. This only happens with -Os, at -O2 and -O0 functions are always aligned at 16-byte boundaries. This only happens with clang because we currently never pass --icf to gold in android builds with gcc. The gold bug is fixed upstream and is in the progress of being merged into the NDK's gold, but it's not there yet. Until it is, disable full ICF on android (where we use -Os). BUG=663886 Committed: https://crrev.com/aaa006d4a8d979e96d2ac248306240a60590b0bc Cr-Commit-Position: refs/heads/master@{#433797}

Patch Set 1 #

Patch Set 2 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M build/config/compiler/BUILD.gn View 1 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
Nico
With this, the clang-built libchrome.so is 3MB larger than the gcc-built one on x64 :-(
4 years, 1 month ago (2016-11-21 21:47:10 UTC) #3
Reid Kleckner
Bummer, lgtm. Good to know Sri fixed the gold bug, though. He sits one cube ...
4 years, 1 month ago (2016-11-21 22:07:02 UTC) #8
Nico
From my reading of the bug, Gergely Nagy fixed the bug and Sri merged the ...
4 years, 1 month ago (2016-11-21 22:15:42 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2524503002/20001
4 years, 1 month ago (2016-11-21 22:16:12 UTC) #12
commit-bot: I haz the power
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_asan_rel_ng/builds/266657)
4 years, 1 month ago (2016-11-22 00:04:23 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2524503002/20001
4 years, 1 month ago (2016-11-22 04:41:47 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-22 05:55:55 UTC) #19
commit-bot: I haz the power
4 years, 1 month ago (2016-11-22 05:57:39 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/aaa006d4a8d979e96d2ac248306240a60590b0bc
Cr-Commit-Position: refs/heads/master@{#433797}

Powered by Google App Engine
This is Rietveld 408576698