Граф коммитов

127 Коммитов

Автор SHA1 Сообщение Дата
pcc 37349a7461 build: Add a new build flag, use_cfi_icall.
This flag enables CFI for indirect calls via a function pointer.

BUG=701919
R=thakis@chromium.org

Review-Url: https://codereview.chromium.org/2749393002
Cr-Original-Commit-Position: refs/heads/master@{#457229}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a7bb0b59a2a4c5918ddfa951f91591ddee7d468e
2017-03-15 22:12:02 +00:00
aizatsky d25400d942 Switching libfuzzer to trace-pc-guard instrumentation.
This reverts commit 23d6de2177b812285946bce6f459815799d825c5.

BUG=651540,687570

Review-Url: https://codereview.chromium.org/2721593003
Cr-Original-Commit-Position: refs/heads/master@{#453396}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fd938bac4105603ff6a997d5de3cabe39d8869c0
2017-02-27 23:49:52 +00:00
mmoroz eefc9cc748 Use -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION for libFuzzer and AFL.
R=kcc@chromium.org, ochang@chromium.org
BUG=695292,694495

Review-Url: https://codereview.chromium.org/2711753005
Cr-Original-Commit-Position: refs/heads/master@{#452783}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0ec18db7916d7549ee8fe61bb6063ca8922ed86e
2017-02-24 09:55:20 +00:00
etienneb fbe2ae32dc Fix removal of unreferenced ASAN API functions
When a DLL is instrumented with ASAN, there is some thunks introduced
that dynamically resolved the function through the imports table and
redirect the call from the DLL to the main executable.

Unfortunately, unreferenced functions recently got removed by the
linker.

Without this fix this function is not part of the final executable:
  __asan_locate_address

  % dumpbin D:\src\chromium\src\out\ninja64\initialexe\chrome.exe /exports | grep asan_l

This is making chrome to crash on startup when loading chrome_elf.dll.
ASAN is failing to hook on a function and call abort, which is also
failing because ASAN is still in the "tls-initialisation" phase.

R=ochang@chromium.org, rnk@chromium.org, thakis@chromium.org, chrisha@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2710573003
Cr-Original-Commit-Position: refs/heads/master@{#451836}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 803397e04777bc734a9c028813351c2e5079faf1
2017-02-21 21:27:35 +00:00
ochang f27455662e Revert of Use trace-pc-guard for libFuzzer. (patchset #1 id:1 of https://codereview.chromium.org/2672853002/ )
Reason for revert:
Still borked on bots.

Original issue's description:
> Reland of Use trace-pc-guard for libFuzzer. (patchset #1 id:1 of https://codereview.chromium.org/2668093004/ )
>
> Reason for revert:
> Got upgraded builders.
>
> Original issue's description:
> > Revert of Use trace-pc-guard for libFuzzer. (patchset #1 id:1 of https://codereview.chromium.org/2665243002/ )
> >
> > Reason for revert:
> > causing build failures: https://crbug.com/687570
> >
> > Original issue's description:
> > > Use trace-pc-guard for libFuzzer.
> > >
> > > BUG=651540
> > >
> > > Review-Url: https://codereview.chromium.org/2665243002
> > > Cr-Commit-Position: refs/heads/master@{#447392}
> > > Committed: 002dca9ca5
> >
> > TBR=inferno@chromium.org,kcc@chromium.org,aizatsky@chromium.org,mmoroz@chromium.org,dpranke@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=651540
> >
> > Review-Url: https://codereview.chromium.org/2668093004
> > Cr-Commit-Position: refs/heads/master@{#447552}
> > Committed: 23d6de2177
>
> TBR=inferno@chromium.org,kcc@chromium.org,aizatsky@chromium.org,mmoroz@chromium.org,dpranke@chromium.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=651540
>
> Review-Url: https://codereview.chromium.org/2672853002
> Cr-Commit-Position: refs/heads/master@{#447825}
> Committed: 28fbc2f083

TBR=inferno@chromium.org,kcc@chromium.org,aizatsky@chromium.org,mmoroz@chromium.org,dpranke@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=651540

Review-Url: https://codereview.chromium.org/2675983002
Cr-Original-Commit-Position: refs/heads/master@{#448011}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f7d20bd4cc3f16bf13dfe2cc5e11c4df2ad45937
2017-02-03 17:03:08 +00:00
ochang 3627c69fb9 Reland of Use trace-pc-guard for libFuzzer. (patchset #1 id:1 of https://codereview.chromium.org/2668093004/ )
Reason for revert:
Got upgraded builders.

Original issue's description:
> Revert of Use trace-pc-guard for libFuzzer. (patchset #1 id:1 of https://codereview.chromium.org/2665243002/ )
>
> Reason for revert:
> causing build failures: https://crbug.com/687570
>
> Original issue's description:
> > Use trace-pc-guard for libFuzzer.
> >
> > BUG=651540
> >
> > Review-Url: https://codereview.chromium.org/2665243002
> > Cr-Commit-Position: refs/heads/master@{#447392}
> > Committed: 002dca9ca5
>
> TBR=inferno@chromium.org,kcc@chromium.org,aizatsky@chromium.org,mmoroz@chromium.org,dpranke@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=651540
>
> Review-Url: https://codereview.chromium.org/2668093004
> Cr-Commit-Position: refs/heads/master@{#447552}
> Committed: 23d6de2177

TBR=inferno@chromium.org,kcc@chromium.org,aizatsky@chromium.org,mmoroz@chromium.org,dpranke@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=651540

Review-Url: https://codereview.chromium.org/2672853002
Cr-Original-Commit-Position: refs/heads/master@{#447825}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 28fbc2f08338a66ed15e96fd2841c66cbbda212f
2017-02-02 20:02:15 +00:00
etienneb 5b8bb0f213 Assert when building Asan on windows in debug mode
R=ochang@chromium.org, rnk@chromium.org, chrisha@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2675753002
Cr-Original-Commit-Position: refs/heads/master@{#447803}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5e86b62256b5d7cdc7a10f57c06a1b040e2bbede
2017-02-02 18:37:59 +00:00
aizatsky 7a418db114 creating build/config/sanitizer/OWNERS file
Adding ochang@ to the file.
sanitizer & libfuzzer build configuration is very interconnected
and often needs to change in sync.

BUG=

Review-Url: https://codereview.chromium.org/2664403005
Cr-Original-Commit-Position: refs/heads/master@{#447685}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5b2d8899ed66b788a1811b15163dd37bc178f5ca
2017-02-02 02:00:05 +00:00
ochang ce18e7a302 Revert of Use trace-pc-guard for libFuzzer. (patchset #1 id:1 of https://codereview.chromium.org/2665243002/ )
Reason for revert:
causing build failures: https://crbug.com/687570

Original issue's description:
> Use trace-pc-guard for libFuzzer.
>
> BUG=651540
>
> Review-Url: https://codereview.chromium.org/2665243002
> Cr-Commit-Position: refs/heads/master@{#447392}
> Committed: 002dca9ca5

TBR=inferno@chromium.org,kcc@chromium.org,aizatsky@chromium.org,mmoroz@chromium.org,dpranke@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=651540

Review-Url: https://codereview.chromium.org/2668093004
Cr-Original-Commit-Position: refs/heads/master@{#447552}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 23d6de2177b812285946bce6f459815799d825c5
2017-02-01 17:46:00 +00:00
ochang 2bc0827ba7 Use trace-pc-guard for libFuzzer.
BUG=651540

Review-Url: https://codereview.chromium.org/2665243002
Cr-Original-Commit-Position: refs/heads/master@{#447392}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 002dca9ca557b96939ed99ae9450dcb42f5d1620
2017-02-01 00:59:09 +00:00
inferno bbb8c0b39f Roll AFL 2.31b:2.38b and switch coverage to use trace-pc-guard.
TBR=dpranke@chromium.org
BUG=684077

Review-Url: https://codereview.chromium.org/2662883002
Cr-Original-Commit-Position: refs/heads/master@{#447032}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c584ddf6b18583daebdc8f02f9ea9b50fb36dbae
2017-01-30 19:26:07 +00:00
krasin c3da4579f1 Enable use-after-scope check on Chrome OS.
Now that Chrome OS uses a recent enough Clang toolchain,
it's possible to enable the check there too.

BUG=683445,649897

Review-Url: https://codereview.chromium.org/2654383002
Cr-Original-Commit-Position: refs/heads/master@{#446503}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 539f64c0e54adc91ae1276948771a3538cf4261b
2017-01-27 00:42:02 +00:00
krasin b5a787ac0d Enable use-after-scope check in ASAN configs.
This is a second attempt to land this change.
Previous attempts failed on some ChromeOS bots
using old version of Clang, on Clang-CL Win bots
and also there were a couple of webkit_tests failed
due to a real use-after-scope issue.

The use-after-scope issue is now fixed by
https://codereview.chromium.org/2649903005/, Windows and
ChromeOS are temporarily blacklisted.

BUG=681136,683459,683966,683445

Review-Url: https://codereview.chromium.org/2654623002
Cr-Original-Commit-Position: refs/heads/master@{#445747}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a9461af221d3d56769f21b6755a8afbef00d6d7d
2017-01-24 17:17:58 +00:00
haraken 92cbc7ad5a Revert of Enable use-after-scope check in ASAN configs. (patchset #5 id:80001 of https://codereview.chromium.org/2451973004/ )
Reason for revert:
This CL caused crashes in Linux ASAN.

https://bugs.chromium.org/p/chromium/issues/detail?id=683459

Original issue's description:
> Enable use-after-scope check in ASAN configs.
>
> At this point, everything but Mac has been fixed. On Mac, there's an outstanding issue, which will be fixed later.
>
> BUG=649897
>
> Review-Url: https://codereview.chromium.org/2451973004
> Cr-Commit-Position: refs/heads/master@{#445114}
> Committed: 8662044434

TBR=thakis@chromium.org,hans@chromium.org,achuith@chromium.org,krasin@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=649897

Review-Url: https://codereview.chromium.org/2645263003
Cr-Original-Commit-Position: refs/heads/master@{#445331}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 73ce07497d3279402d2f51a03e55be8c4612ff50
2017-01-23 07:41:09 +00:00
krasin 1a3483bd0d Enable use-after-scope check in ASAN configs.
At this point, everything but Mac has been fixed. On Mac, there's an outstanding issue, which will be fixed later.

BUG=649897

Review-Url: https://codereview.chromium.org/2451973004
Cr-Original-Commit-Position: refs/heads/master@{#445114}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 866204443431a62c1b6e1404ed3c19c3f529ce45
2017-01-20 19:00:26 +00:00
krasin 3ea5e874ec Don't condition on the branding when choosing LTO and CFI.
BUG=678915

Review-Url: https://codereview.chromium.org/2621193003
Cr-Original-Commit-Position: refs/heads/master@{#442969}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: eed4ea8fb01d92a623f3d912d3ea904e7740e13f
2017-01-11 18:52:59 +00:00
thakis 5c10e06677 Revert of Include -fsanitize=float-cast-overflow in is_ubsan=true builds. (patchset #1 id:1 of https://codereview.chromium.org/2550593004/ )
Reason for revert:
Somewhat speculative; it looks like clusterfuzz might use this list and filed many many float overflow bugs (https://bugs.chromium.org/p/chromium/issues/list?can=2&q=%22Float-cast-overflow%22&x=m&y=releaseblock&cells=ids). While we should fix all those, doing so by letting clusterfuzz file close to a hundred bugs assigned to random people isn't the way we should go about it, and CF filing all this bugs wasn't intended when I wrote this CL.

Original issue's description:
> Include -fsanitize=float-cast-overflow in is_ubsan=true builds.
>
> Also add a comment about the current state of ubsan.
>
> BUG=669642
>
> Committed: https://crrev.com/2e147959b92ac70c0eb3e0568ae664d39614b68c
> Cr-Commit-Position: refs/heads/master@{#436093}

TBR=krasin@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=669642

Review-Url: https://codereview.chromium.org/2598813002
Cr-Original-Commit-Position: refs/heads/master@{#440258}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c4c7a57c10a808a2eefcc605095fe40fb75b2650
2016-12-21 23:14:05 +00:00
aizatsky 53a8a4bbfa [libfuzzer] force use_prebuilt_instrumented_libraries for libfuzzer
BUG=
TBR=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2578683002
Cr-Original-Commit-Position: refs/heads/master@{#439556}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 13ad46f10ec624e7c8713d1d984771391bd6ca0f
2016-12-19 21:12:39 +00:00
kjellander 1a9d4cda91 Make sanitizer suppressions and blacklists fully configurable.
This will make it possible to fully utilize the sanitizers in other
projects that may need to maintain their own suppressions and blacklists.

This change also removes the requirement on having {asan,lsan,tsan}_suppressions_file
defined in //build_overrides/build.gni, simplifying the build configs.

BUG=webrtc:5006
TESTED=CQ dry run + additional sanitizer trybots:
mac_chromium_asan_rel_ng
linux_chromium_ubsan_rel_ng
linux_chromium_msan_rel_ng
linux_chromium_tsan_rel_ng
linux_chromium_asan_rel_ng

Review-Url: https://codereview.chromium.org/2580313002
Cr-Original-Commit-Position: refs/heads/master@{#439452}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 83d8599fdab6538bc3e9cf6e8c9458214a7a8671
2016-12-19 12:10:56 +00:00
thakis f61407a10f Include -fsanitize=float-cast-overflow in is_ubsan=true builds.
Also add a comment about the current state of ubsan.

BUG=669642

Review-Url: https://codereview.chromium.org/2550593004
Cr-Original-Commit-Position: refs/heads/master@{#436093}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2e147959b92ac70c0eb3e0568ae664d39614b68c
2016-12-03 00:23:11 +00:00
ochang 84384c5ff3 sanitizers: set is_lsan=true if use_libfuzzer and is_asan are set (linux)
R=dpranke@chromium.org,aizatsky@chromium.org

Review-Url: https://codereview.chromium.org/2428643002
Cr-Original-Commit-Position: refs/heads/master@{#425719}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2e706c839ca64d5e7a4c8a5b27d9ca099a75c048
2016-10-17 17:55:09 +00:00
thomasanderson 001d0478cd Build: disable CFI when LTO is disabled
Clang CFI relies on link-time optimization, so disable CFI when
allow_posix_link_time_opt = false.
http://clang.llvm.org/docs/ControlFlowIntegrity.html

This was leading to linker errors on an official build with LTO disabled,
such as:
error: obj/native_client/src/shared/gio/libgio.a: no archive symbol table

R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2406673002
Cr-Original-Commit-Position: refs/heads/master@{#424816}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b2472ea7c13e04309fc6bf21c5c537071705e859
2016-10-12 19:23:57 +00:00
mmoroz 88a2285cdc Reland of [libfuzzer] Add more UBSan flags to is_ubsan_security configuration. (patchset #1 id:1 of https://codereview.chromium.org/2405473002/ )
"object-size" option that caused a lot of errors has been removed in this CL.

Reason for revert:
A couple of fuzzers cannot be built with this config: https://build.chromium.org/p/chromium.fyi/builders/Libfuzzer%20Upload%20Linux%20UBSan/builds/1418/steps/compile/logs/stdio

Original issue's description:
> [libfuzzer] Add more UBSan flags to is_ubsan_security configuration.
>
> R=aizatsky@chromium.org, inferno@chromium.org, ochang@chromium.org
> BUG=616438
>
> Committed: https://crrev.com/d1133be663df309a382a88fbf8bd1cd16878ef21
> Cr-Commit-Position: refs/heads/master@{#423990}

TBR=aizatsky@chromium.org,inferno@chromium.org,ochang@chromium.org,dpranke@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=616438
Committed: https://crrev.com/e03c404aecdb715803ebab9ed711fb2d3305a412
Cr-Commit-Position: refs/heads/master@{#424078}

Review-Url: https://codereview.chromium.org/2408903002
Cr-Original-Commit-Position: refs/heads/master@{#424240}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a565e914721e3d0d8d08cd50da0366451c58b04f
2016-10-10 21:15:17 +00:00
mmoroz 17093d45bf Revert of [libfuzzer] Add more UBSan flags to is_ubsan_security configuration. (patchset #1 id:1 of https://codereview.chromium.org/2405473002/ )
Reason for revert:
A couple of fuzzers cannot be built with this config: https://build.chromium.org/p/chromium.fyi/builders/Libfuzzer%20Upload%20Linux%20UBSan/builds/1418/steps/compile/logs/stdio

Original issue's description:
> [libfuzzer] Add more UBSan flags to is_ubsan_security configuration.
>
> R=aizatsky@chromium.org, inferno@chromium.org, ochang@chromium.org
> BUG=616438
>
> Committed: https://crrev.com/d1133be663df309a382a88fbf8bd1cd16878ef21
> Cr-Commit-Position: refs/heads/master@{#423990}

TBR=aizatsky@chromium.org,inferno@chromium.org,ochang@chromium.org,dpranke@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=616438

Review-Url: https://codereview.chromium.org/2403673002
Cr-Original-Commit-Position: refs/heads/master@{#424078}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e03c404aecdb715803ebab9ed711fb2d3305a412
2016-10-08 10:56:49 +00:00
mmoroz 40bdbbd2ff [libfuzzer] Add more UBSan flags to is_ubsan_security configuration.
R=aizatsky@chromium.org, inferno@chromium.org, ochang@chromium.org
BUG=616438

Review-Url: https://codereview.chromium.org/2405473002
Cr-Original-Commit-Position: refs/heads/master@{#423990}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d1133be663df309a382a88fbf8bd1cd16878ef21
2016-10-07 22:40:08 +00:00
thestig 2e2c00b2e7 Android: Avoid linking with --gc-sections.
No more --gc-sections in debug mode for test targets either.

Re-enable instrumentation of globals in ASAN builds.

This is effectively a reland of r387491.

BUG=159801, 159847

Review-Url: https://codereview.chromium.org/2384953003
Cr-Original-Commit-Position: refs/heads/master@{#422638}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 404b02529e8f0139fa719f34ffa326014096a7c7
2016-10-04 00:50:03 +00:00
sdefresne b37bbeecf5 Ensure the sanitizer runtime library is copied to app bundle if enabled.
The clang sanitizer runtime library needs to be copied to the application
bundle if any of the sanitizers (ASAN, MSAN, ...) is enabled. Ensure this
is the case  and that the library is code signed (required with Xcode 8).

Only copy the runtime library if not using Xcode version of clang (as the
runtime library depends on clang version).

BUG=None

Review-Url: https://codereview.chromium.org/2363953004
Cr-Original-Commit-Position: refs/heads/master@{#421537}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8f50c630cef2aefee800e3aefc2401c9a2f126e8
2016-09-28 16:41:44 +00:00
mef 978765f434 Fix sanitizer_options_link_helper for iOS.
Review-Url: https://codereview.chromium.org/2369933006
Cr-Original-Commit-Position: refs/heads/master@{#421306}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9b66238c85080ad1e15a5080a79ba6253e3c16b6
2016-09-27 19:56:57 +00:00
thakis 149cae4612 Roll clang 278861:280106.
* win: Members of base classes now should show up in debugger.
* win: Debugger shouldn't show funny highlights anymore due to
  debug info no longer including column information.  (we still
  force this on if sanitizers are used, mostly for clusterfuzz.
  maybe we want to make this toggleable independent of sanitizers
  at some point)
* win: -Wextern-initializer no longer warns on midl-generated code
* win: clang-cl now accepts /source-encoding:utf-8 and friends
  (utf-8 was the source enconding in clang-cl before already, but
  now we don't warn on an explicit flag requesting this)
* all platforms: Three plugin checks are now on-by-default,
  remove flags for these (see
    https://codereview.chromium.org/2267713003
    https://codereview.chromium.org/2268203002
    https://codereview.chromium.org/2265093002
  )
* win: clang-cl's /Brepro now does what it's supposed to do
* win: clang-cl now emits absolute paths in diagnostics, by
  popular request.

Ran `tools/clang/scripts/upload_revision.py 280106`.

BUG=640254,637456,636109,636091,636099

Review-Url: https://codereview.chromium.org/2292173002
Cr-Original-Commit-Position: refs/heads/master@{#415563}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a033f395bf2547cf4764f77cc9c86d08f3e22c23
2016-08-31 05:18:36 +00:00
thakis cde2a8873b Revert of On asan/win bots building with goma, don't accidentally emit DWARF (patchset #1 id:1 of https://codereview.chromium.org/2224073003/ )
Reason for revert:
We have now rolled past r278139 and this shouldn't be necessary any more.

Original issue's description:
> On asan/win bots building with goma, don't accidentally emit DWARF
>
> This happens to work around a bug we don't yet understand, but seems
> like a good change in its own right too.
>
> BUG=635715
> R=rnk@chromium.org
>
> Committed: https://crrev.com/314120a8cfd5df331d825566d25db1ba1a1983fe
> Cr-Commit-Position: refs/heads/master@{#410785}

TBR=rnk@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=635715

Review-Url: https://codereview.chromium.org/2281583002
Cr-Original-Commit-Position: refs/heads/master@{#414454}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ed9ae8359c2706c16ca4159f0f2f063aa2034e23
2016-08-25 16:38:05 +00:00
ehmaldonado 28344a3e65 Make lsan and tsan suppressions files overridable.
BUG=webrtc:6236

Review-Url: https://codereview.chromium.org/2267753002
Cr-Original-Commit-Position: refs/heads/master@{#413723}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5302bbee2f6c188ce9b3425d136afa8b1c53102c
2016-08-23 13:42:16 +00:00
krasin c8cf055d31 Enable CFI for virtual calls on Linux x86-64 official builds.
This is the second incremental step towards the full CFI launch.
In the first step, we enabled LinkTimeOptimization (LTO) for the
official Chrome builds, which allowed us to devirtualize
51491 site calls pointing to 23149 virtual methods:
https://storage.googleapis.com/cfi-stats/2016-08-15/devirt-methods.html

That sped up a few layout benchmarks by up to 7%
(see https://crbug.com/580389 and https://crbug.com/617283) and
more by 2%-3%.

In the current step, we add Control Flow Integrity checks for
virtual calls. As of now, some functions are excluded from CFI for
performance reasons by either tools/cfi/blacklist.txt or
DISABLE_CFI_PERF attribute.

Once we have proven that there're no perf regressions, we'll be
working on the compiler optimizations to allow reenabling CFI
on the currently suppressed functions.

The remaining part would be to add bad-cast checks to ensure the
forward-edge Control Flow Integrity works as planned. That will
require more work on reducing the overhead for size and speed by these
CFI checks, so we don't enable them right away.

The expected Perf impact by this CL:

- Chrome binary size is increased by 5%,
- Some of the benchmarks are slowed down by up to 3%.

If we see any slowdown, the regressed microbenchmarks will be profiled,
and a few top methods will have CFI disabled on them. This is
the safety valve we intend to use until Clang is ready to generate
more efficient code in these cases.

BUG=464797

Review-Url: https://codereview.chromium.org/2259293002
Cr-Original-Commit-Position: refs/heads/master@{#413252}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e4f3427521c7d96fb1772bd74c7938e39346d280
2016-08-19 21:46:33 +00:00
Nico Weber 915aa981e3 On asan/win bots building with goma, don't accidentally emit DWARF
This happens to work around a bug we don't yet understand, but seems
like a good change in its own right too.

BUG=635715
R=rnk@chromium.org

Review URL: https://codereview.chromium.org/2224073003 .

Cr-Original-Commit-Position: refs/heads/master@{#410785}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 314120a8cfd5df331d825566d25db1ba1a1983fe
2016-08-09 20:05:11 +00:00
metzman 7040ba2570 [libFuzzer][AFL] Allow building fuzzers with SanitizerCoverage and without Address/MemorySanitizer.
BUG=611337
TBR=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2219163002
Cr-Original-Commit-Position: refs/heads/master@{#410193}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 12db05488871ad8790d41eca1871de36b4602fc6
2016-08-05 22:29:23 +00:00
Nico Weber ad70400d94 Only use sanitizers with default toolchain on Windows as well.
There's currently code to disable sanitizers for non-default toolchains
in gcc_toolchain.gni.  Move it to sanitizers.gni, then it's closer to
where all these args are declared and it works on Windows as well.

No intended behavior change on non-Windows.

BUG=598761
TBR=dpranke

Review URL: https://codereview.chromium.org/2216183002 .

Cr-Original-Commit-Position: refs/heads/master@{#409963}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 146d122ae8ed166f294231fbe6ca340ceffc356b
2016-08-05 01:48:15 +00:00
thakis 31a7705e9f gn: Make mini_installer link in static asan builds.
The target removes the default executable_config, so it doesn't receive the
benefit of https://codereview.chromium.org/2208093003 in static-library
builds automatically.  Explicitly make it depend on sanitizers:link_executable.

BUG=598761

Review-Url: https://codereview.chromium.org/2215693003
Cr-Original-Commit-Position: refs/heads/master@{#409938}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3148c7f3469d5f4b2d653fd4bc8c990ac43f759b
2016-08-05 00:11:33 +00:00
thakis bcccccddfe win/asan 64-bit is in development; make sure we don't accidentally use it yet
BUG=598761

Review-Url: https://codereview.chromium.org/2214783002
Cr-Original-Commit-Position: refs/heads/master@{#409856}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2c84540d35380ef8227bceaff92012cacb27aa6f
2016-08-04 19:08:19 +00:00
thakis 28879be1f2 Make base_unittests pass in gn/win/asan builds.
Before this, ScopedHandleTest.MultiProcess would fail because
scoped_handle_test_dll.dll got linked against clang_rt.asan-i386.lib
instead of clang_rt.asan_dll_thunk-i386.lib.  This now works.

BUG=598761

Review-Url: https://codereview.chromium.org/2208093003
Cr-Original-Commit-Position: refs/heads/master@{#409662}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1519f9727ddc675a9e3e1de9b904ef03c7d5b831
2016-08-03 23:35:58 +00:00
thakis 8906f73494 Only bundle_data asan runtime on mac.
bundle_data is a noop on Windows, so no behavior change, but a bit nicer.
Patch from dpranke@

BUG=598761

Review-Url: https://codereview.chromium.org/2200183005
Cr-Original-Commit-Position: refs/heads/master@{#409659}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 640fe86764317ab19f855b06da72ac80c39296d6
2016-08-03 23:27:33 +00:00
rnk 6e04e381ff Copy ASan runtime to buildroot on Windows as well as Mac
Otherwise executables with ASan instrumentation fail to start.

R=etienneb@chromium.org,thakis@chromium.org,dpranke@chromium.org
BUG=598761

Review-Url: https://codereview.chromium.org/2202983003
Cr-Original-Commit-Position: refs/heads/master@{#409374}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cb4bc9e68fdefc6ebd44e20b558a465a98cf0a55
2016-08-02 23:16:53 +00:00
etienneb a57a425db9 Fix GN generation for WinASAN build
This is a step toward a working Asan build with GN.
There are still a few missing pieces to land.

This patch is fixing an assert triggering due to courgette using an
harcoded toolchains.

----------------------
 ERROR at //build/config/sanitizers/sanitizers.gni:12:1: Assertion failed.
  assert(!using_sanitizer || is_clang,
  ^-----
  Sanitizers (is_*san) require setting is_clang = true in 'gn args'
----------------------

This patch is also fixing the compiler-rt runtime paths for a x64 bit
build. The port of WinASAN-64 is almost done and should part of the next
clang roll-deps.

R=thakis@chromium.org, dpranke@chromium.org
TBR=brettw@chromium.org
BUG=598761

Review-Url: https://codereview.chromium.org/2192833002
Cr-Original-Commit-Position: refs/heads/master@{#408857}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 364deb713883f28d2647c5ff160c1a6f7b7ef342
2016-07-30 03:46:18 +00:00
rsesek 995f245f56 [Mac/GN] Fix gn gen when using_sanitizer=true use_custom_libcxx=true.
BUG=630322
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2192923003
Cr-Original-Commit-Position: refs/heads/master@{#408459}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3d6e18f08b7abe178e7abd6babee202b5a763e45
2016-07-28 20:21:35 +00:00
rsesek 885e4165a3 [Mac/GN] Specify the ASan dynamic runtime as a bundle_data deps.
This causes the ASan library to be copied into a bundle's Contents/MacOS/
directory, so it can be loaded via its @executable_path install name.

BUG=630322

Review-Url: https://codereview.chromium.org/2185833002
Cr-Original-Commit-Position: refs/heads/master@{#408174}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1cfe20c37872faa5e4d94b9a3b35959294de9462
2016-07-27 17:47:34 +00:00
sammc 4b2ee7d182 Add GN rules for building instrumented libraries.
BUG=585127

Review-Url: https://codereview.chromium.org/2103683002
Cr-Original-Commit-Position: refs/heads/master@{#406452}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fba9bdbfc9ccc9c7909e1bd4784bcb05df9da649
2016-07-20 01:55:24 +00:00
krasin e609d4bcab Revert of Launch CFI for virtual calls on Linux x86-64. (patchset #2 id:20001 of https://codereview.chromium.org/2140373002/ )
Reason for revert:
Too many blink_perf.layout benchmarks regressed by ~3.5%. While the regressions are within predicted upper bound, there're too many of them to ignore:

https://chromeperf.appspot.com/report?sid=ebf0165d8c96c7a70c790d179a9bdc1f9e58e616182522fd961d17ad648fc28f&start_rev=404312&end_rev=405943

We will need to reevaluate the reason for such consistent slowdown and will make another attempt after it's cleared.

Original issue's description:
> Launch CFI for virtual calls on Linux x86-64.
>
> This is the second incremental step towards the full CFI launch.
> In the first step, we enabled LinkTimeOptimization (LTO) for the
> official Chrome builds. In this step we add Control Flow Integrity
> checks for all virtual calls.
>
> The remaining part is to add bad-cast checks to ensure the forward-edge
> Control Flow Integrity works as planned. That remaining part will
> require more work on reducing the overhead for size and speed by these
> CFI checks, so we don't enable them right away.
>
> The expected Perf impact by this CL:
>
> - Chrome binary size is increased by 5%,
> - Some of the benchmarks are slowed down by up to 3.5%.
>
> Note that before making it slower, we made it faster by implementing
> virtual const propagation and a number of heuristics for automatic
> devirtualization in LLVM which sped up some layout benchmarks by up to 7%
> (see https://crbug.com/580389 and https://crbug.com/617283)
>
> If there's a higher (negative) impact, we'll be willing to roll this
> feature back, but please allow the Perf bots to work for a day or two
> to collect more detailed statistics on the regressions, as it will help
> us to identify ways to speed it up (most likely, by inventing new ways
> for automatic devirtualization).
>
> BUG=464797
>
> Committed: https://crrev.com/01f474c48200a1e556a4cf668e2b5dbda0f38a6f
> Cr-Commit-Position: refs/heads/master@{#405894}

TBR=thakis@chromium.org,esprehn@chromium.org,krasin@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=464797

Review-Url: https://codereview.chromium.org/2154993002
Cr-Original-Commit-Position: refs/heads/master@{#405944}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 532a8777898abba488970f9dc17a067c7c517432
2016-07-16 18:01:00 +00:00
krasin 9fac0b7e49 Launch CFI for virtual calls on Linux x86-64.
This is the second incremental step towards the full CFI launch.
In the first step, we enabled LinkTimeOptimization (LTO) for the
official Chrome builds. In this step we add Control Flow Integrity
checks for all virtual calls.

The remaining part is to add bad-cast checks to ensure the forward-edge
Control Flow Integrity works as planned. That remaining part will
require more work on reducing the overhead for size and speed by these
CFI checks, so we don't enable them right away.

The expected Perf impact by this CL:

- Chrome binary size is increased by 5%,
- Some of the benchmarks are slowed down by up to 3.5%.

Note that before making it slower, we made it faster by implementing
virtual const propagation and a number of heuristics for automatic
devirtualization in LLVM which sped up some layout benchmarks by up to 7%
(see https://crbug.com/580389 and https://crbug.com/617283)

If there's a higher (negative) impact, we'll be willing to roll this
feature back, but please allow the Perf bots to work for a day or two
to collect more detailed statistics on the regressions, as it will help
us to identify ways to speed it up (most likely, by inventing new ways
for automatic devirtualization).

BUG=464797

Review-Url: https://codereview.chromium.org/2140373002
Cr-Original-Commit-Position: refs/heads/master@{#405894}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 01f474c48200a1e556a4cf668e2b5dbda0f38a6f
2016-07-15 23:22:22 +00:00
dpranke 6b747bc853 Land chromium-side work to clean up handling of v8_target_cpu in the GN build.
Currently v8_target_cpu can only be set to one particular architecture,
and that won't work for monochrome/webview builds where we need
to be able to build two different snapshots for two different architectures.

The way things are set are also confusing for when you need to do builds
for a target_cpu that is different from the host_cpu and the value of the
v8_target_cpu might get out of sync between target and host.

This change changes all that by making the cpu that v8 targets
a function of the current toolchain (thus declaring a v8_current_cpu
and using that instead).

R=brettw@chromium.org, jochen@chromium.org, michaelbai@chromium.org

BUG=625353

Review-Url: https://codereview.chromium.org/2116183002
Cr-Original-Commit-Position: refs/heads/master@{#405551}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a2de90db035b90a891f0b980ab6162fd3995499
2016-07-14 20:11:38 +00:00
krasin b8e719fa0c 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

Review-Url: https://codereview.chromium.org/2131423002
Cr-Original-Commit-Position: refs/heads/master@{#404956}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 59d3718ac1328d46fac147720f078c53f63070cf
2016-07-13 03:28:04 +00:00
aizatsky ceb6a884de [sanitizers] asan_globals GN option
Detect overflow/underflow for global objects.
Enabled by default with asan, except for Android & Mac.

Review-Url: https://codereview.chromium.org/2130893002
Cr-Original-Commit-Position: refs/heads/master@{#404918}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: da5892e6e7d244252840ac929e63e446aef2397b
2016-07-13 02:41:13 +00:00
metzman cdebf1762b Build afl-tools with fuzzers.
1. Build afl-fuzz, afl-cmin, afl-tmin and afl-showmap with fuzzers.
2. Add hash.h from afl-2.16b since afl-tools depend on hash.h and it
has a license header.
3. Fix inconsistencies in README.chromium

BUG=611337

Review-Url: https://codereview.chromium.org/2095843002
Cr-Original-Commit-Position: refs/heads/master@{#402280}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7243ef31ec3985f24d8e63282d5c68b2ae618e2e
2016-06-27 21:09:20 +00:00