[msan] Conditionally disable new() and delete() wrappers.
To be used with static libstdc++. llvm-svn: 178866
This commit is contained in:
parent
7948c648bf
commit
c7af878a01
|
@ -244,7 +244,8 @@ void __msan_init() {
|
|||
InitTlsSize();
|
||||
InitializeInterceptors();
|
||||
|
||||
ReplaceOperatorsNewAndDelete();
|
||||
if (MSAN_REPLACE_OPERATORS_NEW_AND_DELETE)
|
||||
ReplaceOperatorsNewAndDelete();
|
||||
const char *msan_options = GetEnv("MSAN_OPTIONS");
|
||||
InitializeFlags(&msan_flags, msan_options);
|
||||
if (StackSizeIsUnlimited()) {
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#include "msan_interface_internal.h"
|
||||
#include "msan_flags.h"
|
||||
|
||||
#ifndef MSAN_REPLACE_OPERATORS_NEW_AND_DELETE
|
||||
# define MSAN_REPLACE_OPERATORS_NEW_AND_DELETE 1
|
||||
#endif
|
||||
|
||||
#define MEM_TO_SHADOW(mem) (((uptr)mem) & ~0x400000000000ULL)
|
||||
#define MEM_TO_ORIGIN(mem) (MEM_TO_SHADOW(mem) + 0x200000000000ULL)
|
||||
#define MEM_IS_APP(mem) ((uptr)mem >= 0x600000000000ULL)
|
||||
|
|
Loading…
Reference in New Issue