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

Unified Diff: runtime/vm/exceptions.cc

Issue 816123002: MemorySanitizer support. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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/platform/platform_headers.gypi ('k') | runtime/vm/native_arguments.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 42458)
+++ runtime/vm/exceptions.cc (working copy)
@@ -4,6 +4,8 @@
#include "vm/exceptions.h"
+#include "platform/address_sanitizer.h"
+
#include "vm/dart_api_impl.h"
#include "vm/dart_entry.h"
#include "vm/debugger.h"
@@ -15,19 +17,6 @@
#include "vm/symbols.h"
#include "vm/tags.h"
-// Allow the use of ASan (AddressSanitizer). This is needed as ASan needs to be
-// told about areas where the VM does the equivalent of a long-jump.
-#if defined(__has_feature)
-#if __has_feature(address_sanitizer)
-extern "C" void __asan_unpoison_memory_region(void *, size_t);
-#else // __has_feature(address_sanitizer)
-void __asan_unpoison_memory_region(void* ignore1, size_t ignore2) {}
-#endif // __has_feature(address_sanitizer)
-#else // defined(__has_feature)
-void __asan_unpoison_memory_region(void* ignore1, size_t ignore2) {}
-#endif // defined(__has_feature)
-
-
namespace dart {
DEFINE_FLAG(bool, print_stacktrace_at_throw, false,
@@ -310,8 +299,8 @@
// Unpoison the stack before we tear it down in the generated stub code.
uword current_sp = reinterpret_cast<uword>(&program_counter) - 1024;
- __asan_unpoison_memory_region(reinterpret_cast<void*>(current_sp),
- stack_pointer - current_sp);
+ ASAN_UNPOISON(reinterpret_cast<void*>(current_sp),
+ stack_pointer - current_sp);
func(program_counter, stack_pointer, frame_pointer,
raw_exception, raw_stacktrace, isolate);
« no previous file with comments | « runtime/platform/platform_headers.gypi ('k') | runtime/vm/native_arguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698