调用 new 关键字 C++ 时,Glibc 检测到 malloc() 内存损坏 (0xb6179bb8)
我的程序运行到调用 new 关键字会导致上述错误的程度。即char* a = new char[100]
。该错误每次都是可重现的。我运行该程序直到调用 new 关键字。似乎内存位置此时已损坏,但我不确定他的问题是什么。
导致此错误的可能原因有哪些?
My program runs to a point where calling the new keyword would cause the error stated above. i.e. char* a = new char[100]
. The error is reproducible and every time. I run the program until that point of calling the new keyword. It seems to be the memory location is corrupted at the point, but I'm not sure what he issue is.
What are the possible causes for this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此错误意味着您已损坏系统内存管理器的簿记数据。
此类损坏通常是由于不正确使用指针造成的,例如
This error means that you have corrupted the bookkeeping data of the system memory manager.
Such corruptions are typically the result of incorrect use of pointers, such as