I'm uploading files to a remote cloud server and got this error when running it from cloud. The program runs without error on my PC.
./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.
Then I thought of running other simpler programs to examine if this is specific to my binary file and still got the same error.
Test program run later:
int main() {
int i = 0;
while(i<10)
{
i =i+1;
std::cout << i << "\n";
}
return 0;
}
Edit: I'm building it with QT version 5.3.2, and running with gdb.