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', + ], + }], + ], + }, }