[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
segmentation fault only when in debug mode
From: |
Fabien Wernli |
Subject: |
segmentation fault only when in debug mode |
Date: |
Sat, 23 Jun 2001 17:40:40 +0200 |
Hi,
I have a big problem useing gdb:
in a very simple (hello world style) program, where I just open a file
and the close it:
filename = fopen("toto.txt","r");
fclose(filename);
the program runs ok, doing nothing as expected.
But when using gdb, fopen() returns an address ONLY when file is toto.txt.
When I change it say to toto2.txt, it returns NO address and fclose makes
a segmentation fault....
gdb msg:
Program received signal SIGSEGV, Segmentation fault.
_IO_feof (fp=0x0) at feof.c:36
36 feof.c: Aucun fichier ou répertoire de ce type.
using gdb 4.18, or 5.0 same result
on an almost identical machine, it works....
please help
tnx a lot
greetings...
+------------------------+
|address@hidden|
|ICQ# 104563077 |
+------------------------+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- segmentation fault only when in debug mode,
Fabien Wernli <=