From 27ab19d9b4f18f553674f39c8335c2adab067bb5 Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Sat, 21 Jun 2014 19:30:29 +0000 Subject: [PATCH] Roll chromium_revision 272489:277350 + fix sanitizer options Rolling to this new Chromium revision required us to introduce a sanitizer_options similar to the one in Chromium's base (see https://code.google.com/p/chromium/codesearch#chromium/src/base/base.gyp&l=977 and https://codereview.chromium.org/238123003) in order to get the same defaults for ASan and LSan. Without it compilation will break since LeakSanitizer (LSan) is enabled by default in Clang r209387 that is pulled with this roll. I setup so that we pull in the sanitizer_options.cc and tsan_suppressions.cc files using DEPS, so we don't have to maintain them separately for now. We can still use our own TSan suppressions.txt file as we do today with no changes needed. This roll also brings in http://crrev.com/276676 so we can enable GN build for WebRTC. Overview of changes in Chrome DEPS: $ svn diff http://src.chromium.org/chrome/trunk/src/DEPS -r 272489:277350 which can be compared with the output of: $ svn cat http://webrtc.googlecode.com/svn/trunk/DEPS | grep chromium_deps | sed 's/^ *//' | sort | uniq in a WebRTC checkout, gives the following relevant changes: * third_party/android_tools 6fc0e1:c6e658 * third_party/libjpeg_turbo 263594:272637 * third_party/libyuv 1000:1007 * third_party/nss 271760:277057 * tools/gyp 1921:1927 * tools/swarming_client ae8085:aea506 The following also shows that Clang is upgraded from r206824 to r209387: $ svn diff http://src.chromium.org/chrome/trunk/src/tools/clang/scripts/update.sh -r 272489:277350 BUG=3441 TEST=Trybots are not passing since after the recipe switch, SVN-based try jobs doesn't seem to support auto-detecting that a sync is needed if there's a DEPS change. R=andrew@webrtc.org, pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/12729004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6516 4adac7df-926f-26a2-2b94-8c16560cd09d --- .gitignore | 2 + DEPS | 25 ++++++-- .../audio_coding/neteq/tools/neteq_rtpplay.cc | 1 - webrtc/sanitizer_options.gyp | 59 +++++++++++++++++++ webrtc/supplement.gypi | 19 +++++- 5 files changed, 98 insertions(+), 8 deletions(-) create mode 100644 webrtc/sanitizer_options.gyp diff --git a/.gitignore b/.gitignore index 2abcc3df7f..3d2c376fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -97,7 +97,9 @@ /tools/gyp /tools/protoc_wrapper /tools/python +/tools/sanitizer_options /tools/swarming_client +/tools/tsan_suppressions /tools/valgrind /tools/win /webrtc/examples/android/media_demo/bin diff --git a/DEPS b/DEPS index 91c29ea145..8312828f85 100644 --- a/DEPS +++ b/DEPS @@ -11,7 +11,7 @@ vars = { "googlecode_url": "http://%s.googlecode.com/svn", "sourceforge_url": "http://svn.code.sf.net/p/%(repo)s/code", "chromium_trunk" : "http://src.chromium.org/svn/trunk", - "chromium_revision": "272489", + "chromium_revision": "277350", # A small subset of WebKit is needed for the Android Python test framework. "webkit_trunk": "http://src.chromium.org/blink/trunk", @@ -137,9 +137,15 @@ deps = { "tools/python": Var("chromium_trunk") + "/src/tools/python@" + Var("chromium_revision"), + "tools/sanitizer_options": + File(Var("chromium_trunk") + "/src/base/debug/sanitizer_options.cc@" + Var("chromium_revision")), + "tools/swarming_client": From("chromium_deps", "src/tools/swarming_client"), + "tools/tsan_suppressions": + File(Var("chromium_trunk") + "/src/base/debug/tsan_suppressions.cc@" + Var("chromium_revision")), + "tools/valgrind": Var("chromium_trunk") + "/src/tools/valgrind@" + Var("chromium_revision"), @@ -160,7 +166,7 @@ deps = { deps_os = { "win": { "third_party/drmemory": - Var("chromium_trunk") + "/src/third_party/drmemory@275048", + Var("chromium_trunk") + "/src/third_party/drmemory@" + Var("chromium_revision"), "third_party/winsdk_samples/src": (Var("googlecode_url") % "webrtc") + "/deps/third_party/winsdk_samples_v71@3145", @@ -173,10 +179,6 @@ deps_os = { "third_party/nss": From("chromium_deps", "src/third_party/nss"), - # SyzyASan to make it possible to run tests under ASan on Windows. - "third_party/syzygy/binaries": - From("chromium_deps", "src/third_party/syzygy/binaries"), - "tools/find_depot_tools": File(Var("chromium_trunk") + "/src/tools/find_depot_tools.py@" + Var("chromium_revision")), }, @@ -346,6 +348,17 @@ hooks = [ "-s", Var("root_dir") + "/third_party/drmemory/drmemory-windows-sfx.exe.sha1", ], }, + { + # Pull the Syzygy binaries, used for optimization and instrumentation. + "name": "syzygy-binaries", + "pattern": ".", + "action": ["python", + Var("root_dir") + "/build/get_syzygy_binaries.py", + "--output-dir=%s/third_party/syzygy/binaries" % Var("root_dir"), + "--revision=b08fb72610963d31cc3eae33f746a04e263bd860", + "--overwrite", + ], + }, { # Download test resources, i.e. video and audio files from Google Storage. "pattern": "\\.sha1", diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc index 3c5f6b0bba..3e3540a8bc 100644 --- a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc +++ b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc @@ -575,7 +575,6 @@ size_t ReplacePayload(webrtc::test::InputAudioFile* replacement_audio_file, " not supported or unknown." << std::endl; webrtc::Trace::ReturnTrace(); exit(1); - assert(false); } } return payload_len; diff --git a/webrtc/sanitizer_options.gyp b/webrtc/sanitizer_options.gyp new file mode 100644 index 0000000000..ece9dc920e --- /dev/null +++ b/webrtc/sanitizer_options.gyp @@ -0,0 +1,59 @@ +# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +# This is a similar target to the one in Chromium's base.gyp. It's needed to get +# the same sanitizer settings as Chromium uses (i.e. ASan, LSan, TSan...). +{ + 'targets': [ + { + 'target_name': 'sanitizer_options', + 'type': 'static_library', + 'toolsets': ['host', 'target'], + 'variables': { + # Every target is going to depend on sanitizer_options, so allow + # this one to depend on itself. + 'prune_self_dependency': 1, + # Do not let 'none' targets depend on this one, they don't need to. + 'link_dependency': 1, + }, + 'sources': [ + '<(DEPTH)/tools/sanitizer_options/sanitizer_options.cc', + ], + 'include_dirs': [ + '<(DEPTH)', + ], + # Some targets may want to opt-out from ASan, TSan and MSan and link + # without the corresponding runtime libraries. We drop the libc++ + # dependency and omit the compiler flags to avoid bringing instrumented + # code to those targets. + 'conditions': [ + ['use_custom_libcxx==1', { + 'dependencies!': [ + '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy', + ], + }], + ['tsan==1', { + 'sources': [ + '<(DEPTH)/tools/tsan_suppressions/tsan_suppressions.cc', + ], + }], + ], + 'cflags!': [ + '-fsanitize=address', + '-fsanitize=thread', + '-fsanitize=memory', + '-fsanitize-memory-track-origins', + ], + 'direct_dependent_settings': { + 'ldflags': [ + '-Wl,-u_sanitizer_options_link_helper', + ], + }, + }, + ], # targets +} diff --git a/webrtc/supplement.gypi b/webrtc/supplement.gypi index 2fad574584..351e10f2f7 100644 --- a/webrtc/supplement.gypi +++ b/webrtc/supplement.gypi @@ -1,6 +1,23 @@ { 'variables': { + 'variables': { + 'webrtc_root%': '<(DEPTH)/webrtc', + }, + 'webrtc_root%': '<(webrtc_root)', 'build_with_chromium': 0, 'use_sanitizer_options': 0, - } + }, + 'target_defaults': { + 'conditions': [ + # Add default sanitizer options similar to Chromium. This cannot be + # put in webrtc/build/common.gypi since that file is not included by + # third party code (yasm will throw leak errors during compile when + # GYP_DEFINES="asan=1". + ['OS=="linux" and (chromeos==0 or target_arch!="ia32")', { + 'dependencies': [ + '<(webrtc_root)/sanitizer_options.gyp:sanitizer_options', + ], + }], + ], + }, }