开发者

Heap Corruption Error when deleting a pointer

开发者 https://www.devze.com 2023-01-05 22:18 出处:网络
I get a heap corruption error when deleting a pointer. For 开发者_开发技巧this project, the linking parameter for Randomized Base Address is set to Disable Image Randomization. Not sure why that is se

I get a heap corruption error when deleting a pointer. For 开发者_开发技巧this project, the linking parameter for Randomized Base Address is set to Disable Image Randomization. Not sure why that is set that way. Anyway, I only get that error when a specific header file of a library is included. The strange thing is that even with that header file included, if the Randomized Base Address is set to Enable Image Randomization, the error does not appear. So is there really a heap corruption or should I just change the linking parameter?


Randomized Base Address tells whether or not to always load the library at the same address. Randomizing it provides some level of security to prevent exploits from calling/modifying the code.

Almost certainly there's a heap problem in your project, and most likely it's unrelated to the header being included. Chances are that the header introduces some symbol that makes use of the corrupted heap, causing the problem. Similarly, when randomizing the base address, your heap is still getting corrupted but the problem never manifests in a visibly-obvious way (although things may be working slightly incorrectly).

If you're able to use a memory checker or debug allocator that might be able to help you.

Otherwise unfortunately without code/more information it will be very hard to give you additional hints.

0

精彩评论

暂无评论...
验证码 换一张
取 消