[compiler-rt] r281410 - [asan] alloc_dealloc_mismatch=0 by default on Android.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 15:25:45 PDT 2016
Author: eugenis
Date: Tue Sep 13 17:25:44 2016
New Revision: 281410
URL: http://llvm.org/viewvc/llvm-project?rev=281410&view=rev
Log:
[asan] alloc_dealloc_mismatch=0 by default on Android.
All known (to me) Android deployments are disabling this flag anyway.
The in-tree script (asan_device_setup) does that, too.
Modified:
compiler-rt/trunk/lib/asan/asan_flags.inc
compiler-rt/trunk/lib/asan/scripts/asan_device_setup
compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc
Modified: compiler-rt/trunk/lib/asan/asan_flags.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_flags.inc?rev=281410&r1=281409&r2=281410&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_flags.inc (original)
+++ compiler-rt/trunk/lib/asan/asan_flags.inc Tue Sep 13 17:25:44 2016
@@ -102,7 +102,7 @@ ASAN_FLAG(bool, poison_array_cookie, tru
// https://github.com/google/sanitizers/issues/309
// TODO(glider,timurrrr): Fix known issues and enable this back.
ASAN_FLAG(bool, alloc_dealloc_mismatch,
- (SANITIZER_MAC == 0) && (SANITIZER_WINDOWS == 0),
+ !SANITIZER_MAC && !SANITIZER_WINDOWS && !SANITIZER_ANDROID,
"Report errors on malloc/delete, new/free, new/delete[], etc.")
ASAN_FLAG(bool, new_delete_type_mismatch, true,
Modified: compiler-rt/trunk/lib/asan/scripts/asan_device_setup
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_device_setup?rev=281410&r1=281409&r2=281410&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/scripts/asan_device_setup (original)
+++ compiler-rt/trunk/lib/asan/scripts/asan_device_setup Tue Sep 13 17:25:44 2016
@@ -300,9 +300,7 @@ if [[ -n "$ASAN_RT64" ]]; then
cp "$ASAN_RT_PATH/$ASAN_RT64" "$TMPDIR/"
fi
-# FIXME: alloc_dealloc_mismatch=0 prevents a failure in libdvm startup,
-# which may or may not be a real bug (probably not).
-ASAN_OPTIONS=start_deactivated=1,alloc_dealloc_mismatch=0,malloc_context_size=0
+ASAN_OPTIONS=start_deactivated=1,malloc_context_size=0
function generate_zygote_wrapper { # from, to, asan_rt
local _from=$1
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc?rev=281410&r1=281409&r2=281410&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc Tue Sep 13 17:25:44 2016
@@ -1,8 +1,8 @@
// Check that we report new[] vs delete as alloc-dealloc-mismatch and not as
// new-delete-type-mismatch when -fsized-deallocation is enabled.
-// RUN: %clangxx_asan -g %s -o %t && not %run %t |& FileCheck %s
-// RUN: %clangxx_asan -fsized-deallocation -g %s -o %t && not %run %t |& FileCheck %s
+// RUN: %clangxx_asan -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t |& FileCheck %s
+// RUN: %clangxx_asan -fsized-deallocation -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t |& FileCheck %s
#include <stdlib.h>
More information about the llvm-commits
mailing list