Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 6284 - fclose(NULL) causes segmentation error
fclose(NULL) causes segmentation error
Product: Red Hat Linux
Classification: Retired
Component: libc (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Cristian Gafton
Depends On:
  Show dependency treegraph
Reported: 1999-10-23 06:49 EDT by Andrew Wiseman
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-01-06 16:07:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andrew Wiseman 1999-10-23 06:49:56 EDT
When I compile and run the example program shown below,
under RedHat Linux 5.2 (Kernel 2.0.36) with gcc
(v2.7.2.3), I get a segmentation error. The same code has
been run on many other Unix systems and even other versions
of Linux without failure. Granted fclose(NULL) is not a
useful thing to do, but nevertheless it should not cause a
segmentation error.

     long *file_rep = 0x0;
Comment 1 Cristian Gafton 2000-01-06 16:07:59 EST
This is a programming error. POSIX says that the behavior is unspecified. And
glibc segfaults to signal a major error in a program, and it is also withing
POSIX's specification.

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