M
Michelle
Hi,
When i compiled a program, i got a segmentation fault as follows:
Program received signal SIGSEGV, Segmentation fault.
0x42074bd0 in _int_free () from /lib/i686/libc.so.6
#0 0x42074bd0 in _int_free () from /lib/i686/libc.so.6
#1 0x42075a5c in free () from /lib/i686/libc.so.6
#2 0x4206293c in fclose@@GLIBC_2.1 () from /lib/i686/libc.so.6
#3 0x08049a76 in getNewDeploy (deploy=0x804b450) at redeploy.c:839
#4 0x08049867 in generate_table (dif=0xbfffde80) at redeploy.c:725
#5 0x08048786 in main () at redeploy.c:63
#6 0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6
The error was caused by function fclose. In the program, i open a file,
read some data from it, then close it. I just checked using gdb. The
data can be read correctly. however when it comes to fclose, a seg fault
appears. Could sb. give me some ideas what may cause fclose fail? Thanks
in advance.
Best.
Michelle
When i compiled a program, i got a segmentation fault as follows:
Program received signal SIGSEGV, Segmentation fault.
0x42074bd0 in _int_free () from /lib/i686/libc.so.6
#0 0x42074bd0 in _int_free () from /lib/i686/libc.so.6
#1 0x42075a5c in free () from /lib/i686/libc.so.6
#2 0x4206293c in fclose@@GLIBC_2.1 () from /lib/i686/libc.so.6
#3 0x08049a76 in getNewDeploy (deploy=0x804b450) at redeploy.c:839
#4 0x08049867 in generate_table (dif=0xbfffde80) at redeploy.c:725
#5 0x08048786 in main () at redeploy.c:63
#6 0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6
The error was caused by function fclose. In the program, i open a file,
read some data from it, then close it. I just checked using gdb. The
data can be read correctly. however when it comes to fclose, a seg fault
appears. Could sb. give me some ideas what may cause fclose fail? Thanks
in advance.
Best.
Michelle