stellar2012wxg / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Patching fails on operator new[] when loading msvcr110.dll into a program compiled in vs2010 #507

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Be on Windows 8, (may also work to install the visual studio 2012 runtime)
2. Compile a simple 32-bit application using visual studio 2010, link against 
gperftools
3. In that application, call ::LoadLibraryExW(L"msvcr110.dll", NULL, 0);

What is the expected output? What do you see instead?

Check failed: false && "Unable to patch because there is an unhandled branch " "
instruction in the initial preamble bytes.": false && "Unable to patch because t
here is an unhandled branch " "instruction in the initial preamble bytes."

What version of the product are you using? On what operating system?

svn trunk r208

Please provide any additional information below.

In the process of debugging this I've also noticed that just calling 
::LoadLibraryW(L"msvcr110.dll") does not get intercepted by 
WindowsInfo::Perftools_LoadLibraryExW, and even after adding a patch for 
LoadLibraryW, gperftools is not detecting all library loads successfully (at 
least, modules that show up in the vs2010 debugger modules list don't always 
immediately get seen by gperftools).

This may also be true just using vs2012 in general, I don't have easy access to 
vs2012 at the moment.

Original issue reported on code.google.com by jfa...@suitabletech.com on 13 Mar 2013 at 12:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
OS: Windows 7
IDE: Visual Studio 2012 Express.
Configuration: 
    win32 release (msvcr110.dll is linked statically);
    tcmalloc is linked statically;
    Linker symbol "__tcmalloc" is defined;

tcmalloc has same problems with patching in this case. Please fix this out soon 
:-)

Original comment by xakep...@gmail.com on 14 Mar 2013 at 9:32

GoogleCodeExporter commented 9 years ago
I have same trouble. Win 7, VS2012 Express, Win32 Release, static linkage.
It looks like these guys have the problem too:
http://www.couchbase.com/issues/browse/MB-6395

Original comment by send.you...@gmail.com on 14 Mar 2013 at 9:40

GoogleCodeExporter commented 9 years ago
i have this trouble now.
platform: windows 7 64bit
visual studio 2012.
it works well for debug/release win64 application. works well with win32 debug 
application.

win32 release crash.

Original comment by db123321...@gmail.com on 24 Apr 2013 at 2:02

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/gperftools/issues/detail?id=511

Original comment by send.you...@gmail.com on 24 Apr 2013 at 7:06

GoogleCodeExporter commented 9 years ago
is there anybody find the solution???

Original comment by db123321...@gmail.com on 27 Apr 2013 at 3:12

GoogleCodeExporter commented 9 years ago
might be duplicate of 511. Please, consider testing with patches attached there.

Original comment by alkondratenko on 6 May 2013 at 7:30

GoogleCodeExporter commented 9 years ago
Assuming duplicate of issue 511

Original comment by alkondratenko on 6 Jul 2013 at 10:29

GoogleCodeExporter commented 9 years ago
Sorry, I haven't had a chance to test this yet. When I get a chance (probably 
not for at least a month or two unfortunately), I will update the ticket with 
my results.

Original comment by jfa...@suitabletech.com on 8 Jul 2013 at 5:03