InitializeInterceptors();
ReplaceOperatorsNewAndDelete();
+ const char *msan_options = GetEnv("MSAN_OPTIONS");
+ InitializeFlags(&msan_flags, msan_options);
if (StackSizeIsUnlimited()) {
if (flags()->verbosity)
Printf("Unlimited stack, doing reexec\n");
SetStackSizeLimitInBytes(32 * 1024 * 1024);
ReExec();
}
- const char *msan_options = GetEnv("MSAN_OPTIONS");
- InitializeFlags(&msan_flags, msan_options);
+
if (flags()->verbosity)
Printf("MSAN_OPTIONS: %s\n", msan_options ? msan_options : "<empty>");
+
msan_running_under_dr = IsRunningUnderDr();
__msan_clear_on_return();
if (__msan_track_origins && flags()->verbosity > 0)
void ReExec() {
char **argv, **envp;
GetArgsAndEnv(&argv, &envp);
- execve(argv[0], argv, envp);
+ execve("/proc/self/exe", argv, envp);
+ Printf("execve failed, errno %d\n", errno);
+ Die();
}
void PrepareForSandboxing() {