From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26109 invoked by alias); 4 Jan 2002 22:01:11 -0000 Mailing-List: contact insight-prs-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-prs-owner@sources.redhat.com Received: (qmail 26062 invoked by uid 61); 4 Jan 2002 22:01:05 -0000 Date: Fri, 04 Jan 2002 14:01:00 -0000 Message-ID: <20020104220105.26058.qmail@sources.redhat.com> To: fabien@obs.univ-lyon1.fr, insight-prs@sourceware.cygnus.com, kseitz@sources.redhat.com, nobody@sourceware.cygnus.com From: kseitz@sources.redhat.com X-Mailer: gnatsweb 2.9.0 Subject: Re: insight/93: stdio.h problems : fopen() returns no adress unless file is called toto.txt !!! X-SW-Source: 2002-q1/txt/msg00023.txt.bz2 List-Id: Synopsis: stdio.h problems : fopen() returns no adress unless file is called toto.txt !!! Responsible-Changed-From-To: unassigned->kseitz Responsible-Changed-By: kseitz Responsible-Changed-When: Fri Jan 4 14:01:04 2002 Responsible-Changed-Why: got it State-Changed-From-To: open->closed State-Changed-By: kseitz State-Changed-When: Fri Jan 4 14:01:04 2002 State-Changed-Why: Um.. Look at your program. It is doing exactly what it should be doing. You're opening "toto.txt". When that file is not found, fopen returns NULL, which is then blindly passed to feof, which segfaults on the NULL. What do you expect to happen? On my Red Hat linux 7.0 box, your program also crashes (with or without Insight). http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=93&database=insight