Menu

#1 Segmentation Fault

open
nobody
None
5
2009-02-24
2009-02-24
Anonymous
No

I compiled pga.cpp with the following command and, as you can see, the output file gave em a segmentation falut.

I run
$ g++ -g -o pga pga.cpp

Then I execute
$ gdb pga
GNU gdb Fedora (6.8-23.fc9)
Copyright (C) 2008 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-redhat-linux-gnu"...
(gdb) run
Starting program: /vol/mi1/gori/PGA/src/pga

Program received signal SIGSEGV, Segmentation fault.
0x0000003066c80f80 in strlen () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install gcc.x86_64 glibc.x86_64

(gdb) bt
#0 0x0000003066c80f80 in strlen () from /lib64/libc.so.6
#1 0x0000003066c6ac70 in puts () from /lib64/libc.so.6
#2 0x00000000004034f2 in main (argc=1, argv=0x7fff23006558) at pga.cpp:721
(gdb)

Discussion


Log in to post a comment.