Closed rconde01 closed 7 years ago
Then when that block is accessed you will get a crash.
No, VLD shouldn't crash in that situation.
Can you give us minimal reproducible project?
Working on it...it's quite a large project so it's somewhat difficult.
So I hope I am barking up the right tree. On Windows 10, it seems like the patching of NtDll is not working correctly because the original instructions have changed. Please see https://vld.codeplex.com/discussions/657261 for my request for help. Thanks
@DraconPern Please check https://github.com/ioannis-e/vld/commit/48d9fef04a3117747c594afaf3036105713323d3 We need some confirmations in order to process it in master.
Ah yup, I'll check it out. Though, we should probably detect the windows version and patch accordingly, otherwise, vld x64 will stop working for older OS's.
Well the change should not affect older OS's but i can not test it. If you have Win7 handy and can confirm that would be great.
I tested @ioannis-e and it works on Windows 7 64 and Windows 10 Enterprise 1607
I have just hit the same issue. Any plan to merge the @ioannis-e fix?
I released a version with these changes
I'm getting crashes every few times running vld 2.5 (although I also get crashes with vld 2.3 and 2.4). If needed I can later give more exhaustive information about my configuration, but I have a primary issue to bring up first. When my application starts vld reports several "New allocation at already allocated address" messages. When it crashes, it crashes on the getCrtBlockUse call in reportLeaks.
Based on the comment in mapBlock:
//block with this address has already been allocated. The // previously allocated block must have been freed (probably by some // mechanism unknown to VLD), or the heap wouldn't have allocated it // again. Replace the previously allocated info with the new info.
I had the following thought.
If this "unknown mechanism" is unallocating memory, then if it unallocates it and never reallocates it, the block map will stale and the contained block will no longer be valid. Then when that block is accessed you will get a crash.
I may be wrong, but my current guess is that this is the cause of my crashes. Any ideas how it could be fixed?
I'm using Visual Studio 2013, Win10, 64-bit.