Chromium Code Reviews| Index: runtime/bin/address_sanitizer.cc |
| =================================================================== |
| --- runtime/bin/address_sanitizer.cc (revision 0) |
| +++ runtime/bin/address_sanitizer.cc (working copy) |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +#include "platform/globals.h" |
| + |
| +#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOSX) |
| +#if defined(__has_feature) |
| +#if __has_feature(address_sanitizer) |
| + |
| +const char *kAsanDefaultOptions = |
| + "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 " |
|
zra
2015/02/12 23:13:38
These are the same options used for Mojo asan buil
koda
2015/02/12 23:29:40
They look safe enough. Consider using 0 rather tha
zra
2015/02/13 00:11:19
Changed to 0 and added handle_segv=0
|
| + "detect_leaks=0 fast_unwind_on_fatal=1 "; |
| + |
| +extern "C" |
| +__attribute__((no_sanitize_address)) |
| +__attribute__((visibility("default"))) |
| +// The function isn't referenced from the executable itself. Make sure it isn't |
| +// stripped by the linker. |
| +__attribute__((used)) |
| +const char *__asan_default_options() { |
| + return kAsanDefaultOptions; |
| +} |
| + |
| +#endif // __has_feature(address_sanitizer) |
| +#endif // defined(__has_feature) |
| +#endif // defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOSX) |