这个错误是什么意思?
我正在 ROOT 平台编写 C++ 代码。我收到以下错误:
*** Break *** segmentation violation
gdb not found, need it for stack trace
Root > Function main() busy flag cleared
我只想知道这意味着什么(一般而言)。
I am writing a C++ code in the ROOT platform. I am getting the following error:
*** Break *** segmentation violation
gdb not found, need it for stack trace
Root > Function main() busy flag cleared
I just want to know what this means (in general).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一般来说,“分段违规”意味着您访问了一块未分配给您的内存。通常,杂散指针就是造成这种情况的原因。
剩下的是一些有关丢失 gdb 的特定于 Linux 的消息(这将有助于理解问题)。
Generally, "segmentation violation" means you accessed a piece of memory that wasn't allocated to you. Usually a stray pointer is the reason for that.
The remaining is some Linux-specific message concerning a missing gdb (which would be helpful to understand the problem).
通常,这意味着您已写入(或可能读取)您没有权限的内存。它要么只是无效内存,要么(如果平台支持这样的概念)它位于您拥有的内存之外。
造成这种情况的一个常见原因是释放指针然后再次使用它。
Typically that means you have written to (or maybe read) memory you don't have permission on. Either it's just invalid memory or (if the platform supports such a concept) it's outside of the memory you own.
A common cause of this is freeing a pointer but then using it again.