【发布时间】:2017-04-28 19:00:10
【问题描述】:
我正在将文件上传到远程云服务器,并在从云中运行时出现此错误。该程序在我的电脑上运行没有错误。
./mythread
Segmentation fault
$ gdb ./mythread
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./mythread...done.
(gdb) run
Starting program: /home/anand/wm/dbug/mythread
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: the debug information found in "/usr/lib/libgl2ps.so.0.0.0" does not match "/usr/lib/libgl2ps.so.0" (CRC mismatch).
warning: the debug information found in "/usr/lib/libxine.so.2.5.0" does not match "/usr/lib/libxine.so.2" (CRC mismatch).
warning: the debug information found in "/usr/lib/libgfortran.so.3.0.0" does not match "/usr/lib/libgfortran.so.3" (CRC mismatch).
warning: the debug information found in "/usr/lib/libspeex.so.1.5.0" does not match "/usr/lib/libspeex.so.1" (CRC mismatch).
warning: the debug information found in "/usr/lib/libopus.so.0.5.0" does not match "/usr/lib/libopus.so.0" (CRC mismatch).
warning: the debug information found in "/usr/lib/libgeos_c.so.1.8.2" does not match "/usr/lib/libgeos_c.so.1" (CRC mismatch).
warning: the debug information found in "/usr/lib/libnetcdf.so.7.1.1" does not match "/usr/lib/libnetcdf.so.7" (CRC mismatch).
warning: the debug information found in "/usr/lib/libogg.so.0.8.2" does not match "/usr/lib/libogg.so.0" (CRC mismatch).
warning: the debug information found in "/usr/lib/libarpack.so.2.0.0" does not match "/usr/lib/libarpack.so.2" (CRC mismatch).
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe3dc2110 in _IO_vfscanf_internal (s=s@entry=0x7fffffffe9a0, format=format@entry=0x7fffe5ddc3d0 "%d%n",
argptr=argptr@entry=0x7fffffffeac8, errp=errp@entry=0x0) at vfscanf.c:340
340 vfscanf.c: No such file or directory.
然后我想运行其他更简单的程序来检查这是否特定于我的二进制文件并且仍然得到相同的错误。
稍后运行测试程序:
int main() {
int i = 0;
while(i<10)
{
i =i+1;
std::cout << i << "\n";
}
return 0;
}
编辑:我正在使用 QT 版本 5.3.2 构建它,并使用 gdb 运行。
【问题讨论】:
-
@deW1 你能指导一下如何解决它吗?
-
请完成后测试程序(包括标题)。并发布你是如何编译它的。
-
添加信息,让这篇文章对其他有同样问题的人有用。
标签: c++ qt segmentation-fault gdb cloud