Bug 4834 - Problems caused by 2 fcloses
Summary: Problems caused by 2 fcloses
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-09-01 18:05 UTC by sinnott
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-09-01 21:42:48 UTC

Attachments (Terms of Use)

Description sinnott 1999-09-01 18:05:16 UTC
I have software that compiled and ran under sun solaris and
Windows NT (both Intel and Alpha).  It had a bug in that it
opened a text file, read from it and then closed the file
twice.  On a later system call (either a time call or when
the time call was removed a fopen for write) the system got
a segmentation fault.  It seems that this bug is causing
problems in Linux that are not being handled properly.

Comment 1 Jeff Johnson 1999-09-01 21:42:59 UTC
This is a programmer error. Memory in the FILE structure is
dynamically freed on the first fclose causing the 2nd fclose
to segfault.

Note You need to log in before you can comment on or make changes to this bug.