Reviewers: earthdok, jochen (slow), Sven Panne,
Message:
Note: This is blocked on moving libc++.gyp to a common depsable place like
buildtools.
Description:
Make msan work for v8 stand-alone.
BUG=425187
Please review this at https://codereview.chromium.org/802583003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+43, -8 lines):
M DEPS
M build/standalone.gypi
Index: DEPS
diff --git a/DEPS b/DEPS
index
8deb181210873309d86d778a1fecf2b6da9f1eeb..166e59f4331840073d9a446aaf1b37c13de3286d
100644
--- a/DEPS
+++ b/DEPS
@@ -17,6 +17,10 @@ deps = {
Var("git_url") + "/external/googletest.git" + "@"
+ "8245545b6dc9c4703e6496d1efd19e975ad2b038", # from svn revision 700
"v8/testing/gmock":
Var("git_url") + "/external/googlemock.git" + "@"
+ "29763965ab52f24565299976b936d1265cb6a271", # from svn revision 501
+ "v8/third_party/libc++/trunk":
+ Var("git_url") + "/chromium/llvm-project/libcxx.git" + "@"
+ "48198f9110397fff47fe7c37cbfa296be7d44d3d",
+ "v8/third_party/libc++abi/trunk":
+ Var("git_url") + "/chromium/llvm-project/libcxxabi.git" + "@"
+ "4ad1009ab3a59fa7a6896d74d5e4de5885697f95",
"v8/tools/clang":
Var("git_url") + "/chromium/src/tools/clang.git" + "@"
+ "90fb65e7a9a5c9d6d9613dfb0e78921c52ca9cfc",
}
Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index
ee91e78899f0b9d726e10c978d89be49fdb98c88..98fe7c7fa94e7917935a3b61ca67c35bfbf07819
100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -36,6 +36,11 @@
'make_clang_dir%': '../third_party/llvm-build/Release+Asserts',
'clang_xcode%': 0,
'asan%': 0,
+ 'msan%': 0,
+ # Track where uninitialized memory originates from. From fastest to
+ # slowest: 0 - no tracking, 1 - track only the initial allocation
site, 2
+ # - track the chain of stores leading from allocation site to use site.
+ 'msan_track_origins%': 1,
'tsan%': 0,
'visibility%': 'hidden',
'v8_enable_backtrace%': 0,
@@ -201,34 +206,60 @@
],
},
'conditions': [
- ['asan==1', {
+ ['asan==1 or msan==1 or tsan==1', {
'target_defaults': {
'cflags_cc+': [
'-fno-omit-frame-pointer',
'-gline-tables-only',
- '-fsanitize=address',
- '-w', # http://crbug.com/162783
],
'cflags_cc!': [
'-fomit-frame-pointer',
],
'ldflags': [
+ # Functions interposed by the sanitizers can make ld think
+ # that some libraries aren't needed when they actually are,
+ # http://crbug.com/234010. As workaround, disable --as-needed.
+ '-Wl,--as-needed',
+ ],
+ 'dependencies': [
+ # Use libc++ (third_party/libc++ and third_party/libc++abi)
instead of
+ # stdlibc++ as standard library. This is intended to use for
instrumented
+ # builds.
+ '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy',
+ ],
+ },
+ }],
+ ['asan==1', {
+ 'target_defaults': {
+ 'cflags_cc+': [
+ '-fsanitize=address',
+ ],
+ 'ldflags': [
'-fsanitize=address',
],
},
}],
+ ['msan==1', {
+ 'target_defaults': {
+ 'cflags_cc+': [
+ '-fsanitize=memory',
+ '-fsanitize-memory-track-origins=<(msan_track_origins)',
+ ],
+ 'ldflags': [
+ '-fsanitize=memory',
+ ],
+ 'defines': [
+ 'MEMORY_SANITIZER',
+ ],
+ },
+ }],
['tsan==1', {
'target_defaults': {
'cflags+': [
- '-fno-omit-frame-pointer',
- '-gline-tables-only',
'-fsanitize=thread',
'-fPIC',
'-Wno-c++11-extensions',
],
- 'cflags!': [
- '-fomit-frame-pointer',
- ],
'ldflags': [
'-fsanitize=thread',
'-pie',
--
--
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.