删除指针时出现堆损坏错误
删除指针时出现堆损坏错误。对于此项目,随机基地址的链接参数设置为禁用图像随机化。不知道为什么要这样设置。无论如何,只有当包含库的特定头文件时我才会收到该错误。奇怪的是,即使包含该头文件,如果随机基地址设置为启用图像随机化,也不会出现错误。那么是否真的存在堆损坏,或者我应该更改链接参数?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
随机基地址指示是否始终在同一地址加载库。随机化它提供了一定程度的安全性,以防止利用调用/修改代码。
几乎可以肯定,您的项目中存在堆问题,并且很可能与包含的标头无关。标头很可能引入了一些使用损坏的堆的符号,从而导致了问题。类似地,当随机化基地址时,您的堆仍然会被损坏,但问题永远不会以明显的方式显现出来(尽管事情可能会稍微不正确)。
如果您能够使用内存检查器或调试分配器,可能会对您有所帮助。
否则不幸的是,如果没有代码/更多信息,将很难给您额外的提示。
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.