Reviewers: danno,
Description:
MSan does not understand inline asm. This change preinitializes cpuid
results, and disables the use of stos.
Random mmap() addresses conflict with sanitizer memory layout.
Please review this at https://codereview.chromium.org/212723003/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files (+14, -4 lines):
M src/atomicops_internals_x86_gcc.cc
M src/platform-posix.cc
M src/v8utils.h
Index: src/atomicops_internals_x86_gcc.cc
===================================================================
--- src/atomicops_internals_x86_gcc.cc (revision 20276)
+++ src/atomicops_internals_x86_gcc.cc (working copy)
@@ -77,10 +77,10 @@
void AtomicOps_Internalx86CPUFeaturesInit() {
using v8::internal::AtomicOps_Internalx86CPUFeatures;
- uint32_t eax;
- uint32_t ebx;
- uint32_t ecx;
- uint32_t edx;
+ uint32_t eax = 0;
+ uint32_t ebx = 0;
+ uint32_t ecx = 0;
+ uint32_t edx = 0;
// Get vendor string (issue CPUID with eax = 0)
cpuid(eax, ebx, ecx, edx, 0);
Index: src/platform-posix.cc
===================================================================
--- src/platform-posix.cc (revision 20276)
+++ src/platform-posix.cc (working copy)
@@ -214,6 +214,11 @@
// See http://code.google.com/p/nativeclient/issues/3341
return NULL;
#endif
+#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
+ defined(THREAD_SANITIZER)
+ // Dynamic tools do not support custom mmap addresses.
+ return NULL;
+#endif
Isolate* isolate = Isolate::UncheckedCurrent();
// Note that the current isolate isn't set up in a call path via
// CpuFeatures::Probe. We don't care about randomization in this case
because
Index: src/v8utils.h
===================================================================
--- src/v8utils.h (revision 20276)
+++ src/v8utils.h (working copy)
@@ -215,6 +215,11 @@
#undef STOS
#endif
+#if defined(MEMORY_SANITIZER)
+ // MemorySanitizer does not understand inline assembly.
+#undef STOS
+#endif
+
#if defined(__GNUC__) && defined(STOS)
asm volatile(
"cld;"
--
--
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.