Revision: 20399
Author: [email protected]
Date: Tue Apr 1 12:45:00 2014 UTC
Log: [msan] Do not unpoison heap if running on simulator.
With the simulator, MSan detects all memory accesses from JIT code
without the need for annotations.
We'd like to keep the annotation in the native (w/o simulator) mode
until we can move all MSan+V8 users to simulator mode.
[email protected]
Review URL: https://codereview.chromium.org/212833002
Patch from Evgeniy Stepanov <[email protected]>.
http://code.google.com/p/v8/source/detail?r=20399
Modified:
/branches/bleeding_edge/src/msan.h
/branches/bleeding_edge/src/spaces.cc
=======================================
--- /branches/bleeding_edge/src/msan.h Wed Oct 23 13:50:01 2013 UTC
+++ /branches/bleeding_edge/src/msan.h Tue Apr 1 12:45:00 2014 UTC
@@ -30,6 +30,8 @@
#ifndef V8_MSAN_H_
#define V8_MSAN_H_
+#include "globals.h"
+
#ifndef __has_feature
# define __has_feature(x) 0
#endif
@@ -38,12 +40,12 @@
# define MEMORY_SANITIZER
#endif
-#ifdef MEMORY_SANITIZER
-# include <sanitizer/msan_interface.h>
+#if defined(MEMORY_SANITIZER) && !defined(USE_SIMULATOR)
+# include <sanitizer/msan_interface.h> // NOLINT
// Marks a memory range as fully initialized.
-# define MSAN_MEMORY_IS_INITIALIZED(p, s) __msan_unpoison((p), (s))
+# define MSAN_MEMORY_IS_INITIALIZED_IN_JIT(p, s) __msan_unpoison((p), (s))
#else
-# define MSAN_MEMORY_IS_INITIALIZED(p, s)
+# define MSAN_MEMORY_IS_INITIALIZED_IN_JIT(p, s)
#endif
#endif // V8_MSAN_H_
=======================================
--- /branches/bleeding_edge/src/spaces.cc Tue Apr 1 08:57:48 2014 UTC
+++ /branches/bleeding_edge/src/spaces.cc Tue Apr 1 12:45:00 2014 UTC
@@ -711,7 +711,7 @@
executable,
owner);
result->set_reserved_memory(&reservation);
- MSAN_MEMORY_IS_INITIALIZED(base, chunk_size);
+ MSAN_MEMORY_IS_INITIALIZED_IN_JIT(base, chunk_size);
return result;
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.