Revision: 20287
Author: [email protected]
Date: Wed Mar 26 16:18:28 2014 UTC
Log: Don't try to use ASan on Windows
Let ASan support depend on __has_feature(address_sanitizer) instead of
defined(ADDRESS_SANITIZER)
[email protected]
Review URL: https://codereview.chromium.org/213133002
http://code.google.com/p/v8/source/detail?r=20287
Modified:
/branches/bleeding_edge/build/standalone.gypi
/branches/bleeding_edge/src/zone-inl.h
/branches/bleeding_edge/src/zone.h
=======================================
--- /branches/bleeding_edge/build/standalone.gypi Wed Mar 26 10:01:53 2014
UTC
+++ /branches/bleeding_edge/build/standalone.gypi Wed Mar 26 16:18:28 2014
UTC
@@ -184,9 +184,6 @@
'ldflags': [
'-fsanitize=address',
],
- 'defines': [
- 'ADDRESS_SANITIZER',
- ],
},
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
=======================================
--- /branches/bleeding_edge/src/zone-inl.h Wed Mar 26 10:01:53 2014 UTC
+++ /branches/bleeding_edge/src/zone-inl.h Wed Mar 26 16:18:28 2014 UTC
@@ -30,7 +30,7 @@
#include "zone.h"
-#ifdef ADDRESS_SANITIZER
+#ifdef V8_USE_ADDRESS_SANITIZER
#include <sanitizer/asan_interface.h>
#else
#define ASAN_UNPOISON_MEMORY_REGION(start, size) ((void) 0)
@@ -64,7 +64,7 @@
Address result = position_;
int size_with_redzone =
-#ifdef ADDRESS_SANITIZER
+#ifdef V8_USE_ADDRESS_SANITIZER
size + kASanRedzoneBytes;
#else
size;
@@ -76,7 +76,7 @@
position_ += size_with_redzone;
}
-#ifdef ADDRESS_SANITIZER
+#ifdef V8_USE_ADDRESS_SANITIZER
Address redzone_position = result + size;
ASSERT(redzone_position + kASanRedzoneBytes == position_);
ASAN_POISON_MEMORY_REGION(redzone_position, kASanRedzoneBytes);
=======================================
--- /branches/bleeding_edge/src/zone.h Wed Mar 26 10:01:53 2014 UTC
+++ /branches/bleeding_edge/src/zone.h Wed Mar 26 16:18:28 2014 UTC
@@ -38,6 +38,11 @@
namespace v8 {
namespace internal {
+#if defined(__has_feature)
+ #if __has_feature(address_sanitizer)
+ #define V8_USE_ADDRESS_SANITIZER
+ #endif
+#endif
class Segment;
class Isolate;
@@ -90,7 +95,7 @@
// All pointers returned from New() have this alignment. In addition,
if the
// object being allocated has a size that is divisible by 8 then its
alignment
// will be 8. ASan requires 8-byte alignment.
-#ifdef ADDRESS_SANITIZER
+#ifdef V8_USE_ADDRESS_SANITIZER
static const int kAlignment = 8;
STATIC_ASSERT(kPointerSize <= 8);
#else
--
--
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.