From f1dcd46a9b8e9c665ccd4c2c07ba1497683ac001 Mon Sep 17 00:00:00 2001 From: Henrik Kjellander Date: Tue, 27 Oct 2015 15:31:45 +0100 Subject: [PATCH] UBSan: Add blacklist files for WebRTC standalone. For more info, see http://dev.chromium.org/developers/testing/undefinedbehaviorsanitizer BUG=webrtc:5124 TESTED=Passing compilation using: GYP_DEFINES="ubsan=1" webrtc/build/gyp_webrtc && ninja -C out/Release GYP_DEFINES="ubsan_vptr=1" webrtc/build/gyp_webrtc && ninja -C out/Release R=pbos@webrtc.org Review URL: https://codereview.webrtc.org/1418213005 . Cr-Commit-Position: refs/heads/master@{#10429} --- tools/ubsan/OWNERS | 2 ++ tools/ubsan/blacklist.txt | 15 +++++++++++++++ tools/ubsan/vptr_blacklist.txt | 22 ++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 tools/ubsan/OWNERS create mode 100644 tools/ubsan/blacklist.txt create mode 100644 tools/ubsan/vptr_blacklist.txt diff --git a/tools/ubsan/OWNERS b/tools/ubsan/OWNERS new file mode 100644 index 0000000000..25eae571ce --- /dev/null +++ b/tools/ubsan/OWNERS @@ -0,0 +1,2 @@ +pbos@webrtc.org +kjellander@webrtc.org diff --git a/tools/ubsan/blacklist.txt b/tools/ubsan/blacklist.txt new file mode 100644 index 0000000000..8bcb29073b --- /dev/null +++ b/tools/ubsan/blacklist.txt @@ -0,0 +1,15 @@ +############################################################################# +# UBSan blacklist. +# Please think twice before you add or remove these rules. + +# This is a stripped down copy of Chromium's blacklist.txt, to enable +# adding WebRTC-specific blacklist entries. + +############################################################################# +# YASM does some funny things that UBsan doesn't like. +# https://crbug.com/489901 +src:*/third_party/yasm/* + +############################################################################# +# Ignore system libraries. +src:*/usr/* diff --git a/tools/ubsan/vptr_blacklist.txt b/tools/ubsan/vptr_blacklist.txt new file mode 100644 index 0000000000..02adc84630 --- /dev/null +++ b/tools/ubsan/vptr_blacklist.txt @@ -0,0 +1,22 @@ +############################################################################# +# UBSan vptr blacklist. +# Function and type based blacklisting use a mangled name, and it is especially +# tricky to represent C++ types. For now, any possible changes by name manglings +# are simply represented as wildcard expressions of regexp, and thus it might be +# over-blacklisted. +# +# Please think twice before you add or remove these rules. +# +# This is a stripped down copy of Chromium's vptr_blacklist.txt, to enable +# adding WebRTC-specific blacklist entries. + +############################################################################# +# Using raw pointer values. +# +# A raw pointer value (16) is used to infer the field offset by +# GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET. + +src:*/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc +src:*/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc +src:*/third_party/protobuf/src/google/protobuf/descriptor.pb.cc +