Re: Segmentation fault

From: flawed (flawed@io.com)
Date: 09/14/01


On Fri, 14 Sep 2001, Mike Breuer wrote:
> ----- Original Message -----
> From: "Mysidia" <jmhess@I-55.COM>
> > Note that some C libraries will check for and throw away NULL fcloses
> > silently, others will not check and memory corruption results;
> > fclose as found in MSVC++ does a direct assert() on the condition.

> I am running my MUD on a default RedHat 7.1 install (which is what I'm
> guessing is what was meant by Linux 7.1).  When I put in ASCII player files,
> I forgot to take out the fclose(player_fl); from comm.c, and received a
> segmentation fault on shutdown.  player_fl was being defined as NULL and
> never used, so doing an fclose(NULL) on that platform definitely will cause
> a crash.

I went around and looked just to see, and it does appear correct that if
the fclose(player_fl); in comm.c did in fact cause the seg fault.  If
someone could though, explain the possible dangers of removing that, or
not replacing it with something else... is that fine to do?

again Dels bpl17 bundle
and its it is redhat 7.1

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST