diff options
author | siggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-04 18:56:20 +0000 |
---|---|---|
committer | siggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-04 18:56:20 +0000 |
commit | 88f466bcb81b2ec481828fd5593c3c99433b7f7c (patch) | |
tree | 5a064577accdfa2a15bf5a324eba21eae8a8af73 /content/common/sandbox_win.cc | |
parent | 1ce5e44935b73f0f1e5dc8bf114dff418fffba7d (diff) | |
download | chromium_src-88f466bcb81b2ec481828fd5593c3c99433b7f7c.zip chromium_src-88f466bcb81b2ec481828fd5593c3c99433b7f7c.tar.gz chromium_src-88f466bcb81b2ec481828fd5593c3c99433b7f7c.tar.bz2 |
Disable DuplicateHandle patch in Syzygy-instrumented binaries.
TBR=joi@chromium.org
BUG=257137
Review URL: https://codereview.chromium.org/18701003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/sandbox_win.cc')
-rw-r--r-- | content/common/sandbox_win.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc index 4abd553..acd3f9a 100644 --- a/content/common/sandbox_win.cc +++ b/content/common/sandbox_win.cc @@ -9,6 +9,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/debug/debugger.h" +#include "base/debug/profiler.h" #include "base/debug/trace_event.h" #include "base/file_util.h" #include "base/hash.h" @@ -526,7 +527,11 @@ bool InitBrokerServices(sandbox::BrokerServices* broker_services) { #ifndef OFFICIAL_BUILD BOOL is_in_job = FALSE; CHECK(::IsProcessInJob(::GetCurrentProcess(), NULL, &is_in_job)); - if (!is_in_job && !g_iat_patch_duplicate_handle.is_patched()) { + // In a Syzygy-profiled binary, instrumented for import profiling, this + // patch will end in infinite recursion on the attempted delegation to the + // original function. + if (!base::debug::IsBinaryInstrumented() && + !is_in_job && !g_iat_patch_duplicate_handle.is_patched()) { HMODULE module = NULL; wchar_t module_name[MAX_PATH]; CHECK(::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, |