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

Unified Diff: chrome/test/pyautolib/asan_stub.c

Issue 25648006: Updateing ASAN stub with new API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updating ASAN stub with new API Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/asan_stub.c
diff --git a/chrome/test/pyautolib/asan_stub.c b/chrome/test/pyautolib/asan_stub.c
index e3c5e178638ebfb6b87df62c4e40f4e198f5b6b7..396078b07af2c1948ad11ebe2c36dba7b00c64c1 100644
--- a/chrome/test/pyautolib/asan_stub.c
+++ b/chrome/test/pyautolib/asan_stub.c
@@ -65,6 +65,31 @@ void __asan_init_v1() {
__asan_init();
}
+void __asan_init_v3() {
+ static int inited = 0;
+ if (inited) return;
+ inited = 1;
+#if __WORDSIZE == 64
+ unsigned long start = 0x00007fff8000;
+ unsigned long size = 0x100000000000;
+#else
+ unsigned long start = 0x20000000;
+ unsigned long size = 0x20000000;
+#endif
+ void *res = mmap((void*)start, size,
+ PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANON | MAP_FIXED | MAP_NORESERVE,
+ 0, 0);
+ if (res == (void*)start) {
+ fprintf(stderr, "Fake AddressSanitizer run-time initialized ok at %p\n",
+ res);
+ } else {
+ fprintf(stderr, "Fake AddressSanitizer run-time failed to initialize.\n"
+ "You have been warned. Aborting.");
+ abort();
+ }
+}
+
void __asan_handle_no_return() { }
void __asan_register_globals() { }
void __asan_report_load1() { }
@@ -82,3 +107,6 @@ void __asan_report_store_n() { }
void __asan_set_error_report_callback() { }
void __asan_unregister_globals() { }
void __sanitizer_sandbox_on_notify() { }
+void __asan_before_dynamic_init(const char *module_name) { }
+void __asan_after_dynamic_init() { }
+
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698