Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2589)

Unified Diff: runtime/bin/address_sanitizer.cc

Issue 922863003: Allows gen_snapshot to be built with asan in the Mojo tree. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/bin/bin.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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=0 check_printf=1 use_sigaltstack=1 "
+ "detect_leaks=0 fast_unwind_on_fatal=1 handle_segv=0 ";
+
+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)
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/bin/bin.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698