[英]program received signal SIGSEGV, segmentation fault
I am running a program in multi threaded environment it fails at some point. 我在多线程环境中运行某个程序,该程序有时会失败。 when i tried it with gdb than it is shoing the following error.
当我尝试使用gdb时,它会出现以下错误。
program received signal SIGSEGV, segmentation fault. 程序收到信号SIGSEGV,分段错误。
[switching to thread 0x7fff677b700 (LWP 2777)] 0x00007ffff7aa42b9 in process_incomplete_rows (resultset=0x507950) at c/mgmt.c:479 479 c/mgmt.c: No such file or directory.
[切换到线程0x7fff677b700(LWP 2777)],位于c / mgmt.c中的process_incomplete_rows(resultset = 0x507950)中的0x00007ffff7aa42b9:479 479 c / mgmt.c:无此类文件或目录。
mgmt.c file is there and this code is working fine for some options but 2 or three options its giving this error. mgmt.c文件存在,并且此代码对于某些选项工作正常,但2或3个选项会导致此错误。 What could be the cause of this error.
可能是此错误的原因。 Its error in comiplation or in coe?
它在交战还是在coe上的错误? or its error while accessing some data?
还是访问某些数据时出错?
A segmentation fault is a runtime error that is usually due to referencing an invalid pointer. 分段错误是运行时错误,通常是由于引用无效的指针引起的。 Usually that invalid pointer has never been initialized, but sometimes it is reusing an old pointer or writing past the end of an allocated memory chunk (such as past the end of a string).
通常,无效指针从未被初始化过,但是有时它会重用旧指针或在已分配内存块的末尾(例如,在字符串末尾)进行写入。
It probably means that your node
variable is either NULL
or corrupted. 这可能意味着您的
node
变量为NULL
或已损坏。 Run your program in the debugger, stepping through it from some point prior to the crash up until it and see where you've messed it up. 在调试器中运行您的程序,从崩溃之前的某个点开始逐步执行程序,直到发现错误之处为止。 Or use one of the automated tools like Purify or Insure++ to track it down for you.
或使用Purify或Insure ++之类的自动化工具之一来为您进行跟踪。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.