Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Compile sanitizer suppressions list and file bugs as necessary. #12991

Merged
merged 1 commit into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flow/layers/layer_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class LayerTree {
}

private:
SkISize frame_size_; // Physical pixels.
SkISize frame_size_ = SkISize::MakeEmpty(); // Physical pixels.
std::shared_ptr<Layer> root_layer_;
fml::TimePoint build_start_;
fml::TimePoint build_finish_;
Expand Down
42 changes: 42 additions & 0 deletions testing/lsan_suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# For more information on how to add additional suppressions here go to
# https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer#suppressions

# The Dart VM has incorrectly annotated false positives that we don't care
# about.
leak:dart::*

# Objective-C class definitions are not leaks.
leak:class_createInstance

# SkSurfaces from Embedder backing stores may not be collected on engine
# shutdown.
# https://github.com/flutter/flutter/issues/42172
leak:MakeSkSurfaceFromBackingStore

# dispatch_once blocks don't cleanup their contents.
leak:_dispatch_once_callout

# Message loops in TLS slots may not be collected.
# https://github.com/flutter/flutter/issues/42174
leak:fml::MessageLoop::EnsureInitializedForCurrentThread

# CFRunLoopSource in MessageLoopDarwin not being collected
# https://github.com/flutter/flutter/issues/42175
leak:wrap_dispatch_source_set_event_handler


# Dispatched platform message that are not handled due to isolate death are
# leaked.
# https://github.com/flutter/flutter/issues/42176
leak:flutter::PlatformViewEmbedder::HandlePlatformMessage

# Service ID platform message is leaked in case the isolate dies before the
# message is received by the the same.
# https://github.com/flutter/flutter/issues/42178
leak:flutter::Engine::Run(flutter::RunConfiguration)

# Font families on are leaked when launching the shell.
# https://github.com/flutter/flutter/issues/42179
leak:txt::FontCollection::CreateMinikinFontFamily
leak:CGFontCreateFontsWithURL
leak:txt::GetDefaultFontFamily
16 changes: 16 additions & 0 deletions testing/sanitizer_suppressions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CURRENT_DIRECTORY="$(pwd)/$(dirname "$0")"

TSAN_SUPPRESSIONS_FILE="${CURRENT_DIRECTORY}/tsan_suppressions.txt"
export TSAN_OPTIONS="suppressions=${TSAN_SUPPRESSIONS_FILE}"
echo "Using Thread Sanitizer suppressions in ${TSAN_SUPPRESSIONS_FILE}"

LSAN_SUPPRESSIONS_FILE="${CURRENT_DIRECTORY}/lsan_suppressions.txt"
export LSAN_OPTIONS="suppressions=${LSAN_SUPPRESSIONS_FILE}"
echo "Using Leak Sanitizer suppressions in ${LSAN_SUPPRESSIONS_FILE}"

UBSAN_SUPPRESSIONS_FILE="${CURRENT_DIRECTORY}/ubsan_suppressions.txt"
export UBSAN_OPTIONS="suppressions=${UBSAN_SUPPRESSIONS_FILE}"
echo "Using Undefined Behavior suppressions in ${UBSAN_SUPPRESSIONS_FILE}"


export ASAN_OPTIONS="detect_leaks=1"
14 changes: 14 additions & 0 deletions testing/tsan_suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# For more information on how to add additional suppressions here go to
# https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions

# We don't care about errors from the Dart VM.
race:dart::*

# Data race on animator begin frame when the engine is shutting down.
# https://github.com/flutter/flutter/issues/42190
race:flutter::Shell::OnAnimatorBeginFrame
race:flutter::Shell::OnAnimatorNotifyIdle

# Data race in MessageLoopTaskQueues disposal.
# https://github.com/flutter/flutter/issues/42192
race:fml::MessageLoopTaskQueues::Dispose
10 changes: 10 additions & 0 deletions testing/ubsan_suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# For more information on how to add additional suppressions here go to
# https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#id13

# Ignore errors is Dart VM.
alignment:third_party/dart
null:third_party/dart

# Ignore errors in SwiftShader
undefined:third_party/swiftshader