cuitao2046 / gperftools

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

TCMalloc crash in Release with VS2012 #511

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open gperftools.sln in VS2012
2. Compile release config with platform toolset v110
3. Observe that all unittests are crashing

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

What version of the product are you using? On what operating system?
GPerfTools-2.0, Win 7 Pro x64

Please provide any additional information below.
Unittests seem to work well in debug. If I switch to platform toolset v100, 
everything works OK in release also.

Original issue reported on code.google.com by T.Rejh...@gmail.com on 23 Mar 2013 at 1:20

GoogleCodeExporter commented 9 years ago

Original comment by alkondratenko on 1 Apr 2013 at 5:13

GoogleCodeExporter commented 9 years ago
I think this is the same issue:
https://code.google.com/p/gperftools/issues/detail?id=507

Pay attention to the problem configuration: Win32 Release.
x64 Debug/Release and Win32 Debug work fine.

Original comment by send.you...@gmail.com on 1 Apr 2013 at 10:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I found the "crash" occurs in PreamblePatcher::RawPatchWithStub().
The condition is satisfied in the line 161 and the message "Unable to patch 
because there is an unhandled branch instruction in the initial preamble 
bytes." is generated.

My revision is 182.

Original comment by send.you...@gmail.com on 1 Apr 2013 at 10:28

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

same issue:
https://code.google.com/p/gperftools/issues/detail?can=2&start=0&num=100&q=&cols
pec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&i
d=507

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

GoogleCodeExporter commented 9 years ago
Dear anybody "alkondratenko"! (Dear Santa Claus!) Please, find a correct 
patching code solution soon! I am waiting for this since new year :-) The deer 
is almost died of waiting. With gratitude heartly, your Elves.

Original comment by xakep...@gmail.com on 27 Apr 2013 at 11:47

GoogleCodeExporter commented 9 years ago
I think I nailed this particular case. But I'll need a bit more time to do more 
testing and request review.

In the meantime you're free to try it out of my git branch here: 
https://github.com/alk/gperftools/tree/wip-win-patching

Let me know if it doesn't work

Original comment by alkondratenko on 4 May 2013 at 3:49

GoogleCodeExporter commented 9 years ago
Here's patches that I've made. Please, review.

One fixes short unconditional jumps patching that prevented VS2012 release mode 
working on i386. Second fixes rex.w jmp handling that I've found to be a 
problem when patching msvcrt.dll that's shipped in win2012. Third patch fixes 
incorrect conditional jumps handling I've spotted in existing code while I was 
testing short jump patching.

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

Attachments:

GoogleCodeExporter commented 9 years ago
Looks solid to me.

Original comment by david.ch...@exinda.com on 6 May 2013 at 8:21

GoogleCodeExporter commented 9 years ago
Merged. Thanks for review.

Original comment by alkondratenko on 7 May 2013 at 7:35