|
39 | 39 | #include <sys/mman.h>
|
40 | 40 | #include <sys/syscall.h> /* for SYS_mmap */
|
41 | 41 |
|
| 42 | +#include <string.h> |
| 43 | + |
| 44 | +// XXX: it seems setting macro in CMakeLists.txt does not work, |
| 45 | +// so manually set it here now. |
| 46 | + |
| 47 | +// Building msandr client for running in DynamoRIO hybrid mode, |
| 48 | +// which allows some module running natively. |
| 49 | +// TODO: turn it on by default when hybrid is stable enough |
| 50 | +// #define MSANDR_NATIVE_EXEC |
| 51 | + |
| 52 | +#ifndef MSANDR_NATIVE_EXEC |
42 | 53 | #include <algorithm>
|
43 |
| -#include <string> |
44 | 54 | #include <set>
|
| 55 | +#include <string> |
45 | 56 | #include <vector>
|
46 |
| -#include <string.h> |
| 57 | +#endif |
47 | 58 |
|
48 | 59 | #define TESTALL(mask, var) (((mask) & (var)) == (mask))
|
49 | 60 | #define TESTANY(mask, var) (((mask) & (var)) != 0)
|
|
60 | 71 |
|
61 | 72 | #define VERBOSITY 0
|
62 | 73 |
|
63 |
| -// XXX: it seems setting macro in CMakeLists.txt does not work, |
64 |
| -// so manually set it here now. |
65 |
| - |
66 |
| -// Building msandr client for running in DynamoRIO hybrid mode, |
67 |
| -// which allows some module running natively. |
68 |
| -// TODO: turn it on by default when hybrid is stable enough |
69 |
| -// #define MSANDR_NATIVE_EXEC |
70 |
| - |
71 | 74 | // Building msandr client for standalone test that does not need to
|
72 | 75 | // run with msan build executables. Disable by default.
|
73 | 76 | // #define MSANDR_STANDALONE_TEST
|
|
91 | 94 |
|
92 | 95 | namespace {
|
93 | 96 |
|
94 |
| -std::string g_app_path; |
95 |
| - |
96 | 97 | int msan_retval_tls_offset;
|
97 | 98 | int msan_param_tls_offset;
|
98 | 99 |
|
@@ -186,7 +187,6 @@ void InitializeMSanCallbacks() {
|
186 | 187 | dr_get_application_name());
|
187 | 188 | CHECK(app);
|
188 | 189 | }
|
189 |
| - g_app_path = app->full_path; |
190 | 190 |
|
191 | 191 | __msan_get_retval_tls_offset = (int (*)())
|
192 | 192 | LookupCallback(app, "__msan_get_retval_tls_offset");
|
|
0 commit comments