oldiofclose.c and segmentation faults

This is a discussion on oldiofclose.c and segmentation faults within the C Programming forums, part of the General Programming Boards category; Hi, I was wondering if someone had thoughts on a segmentation fault I have been getting. This code was not ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    1

    oldiofclose.c and segmentation faults

    Hi,

    I was wondering if someone had thoughts on a segmentation fault I have been getting. This code was not written by me - I'm just working on it now. I've stepped through the program using the gdb debugger, and I'm getting this message:

    Program received signal SIGSEGV, Segmentation fault.
    0x00ba6f6b in _IO_old_fclose (fp=0x83d1e68) at
    oldiofclose.c:60
    60 oldiofclose.c: No such file or directory.
    in oldiofclose.c
    (gdb)

    That's the last (and only) error. I think the program is generating this error while writing to a bunch of output files. My question is this: according to a Google search, this problem is caused by a compilation problem. Basically, you need to compile against glibc 2.1.1 (or higher). I'm looking into that aspect of it now, but does anyone know of any OTHER reason I could be getting this error?

    Thanks in advance.

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    The error suggests that fclose is being called with an invalid argument (a value not returned by fopen or a value that has already been passed to fclose).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-03-2009, 04:40 PM
  2. Trouble with DMA Segmentation Faults
    By firestorm717 in forum C Programming
    Replies: 2
    Last Post: 05-07-2006, 09:20 PM
  3. Segmentation faults on Linked Lists. (Please help!!)
    By summerrainx in forum C++ Programming
    Replies: 3
    Last Post: 03-19-2005, 06:23 AM
  4. segmentation faults pervade
    By ezwise in forum C Programming
    Replies: 8
    Last Post: 02-28-2005, 02:17 PM
  5. Locating A Segmentation Fault
    By Stack Overflow in forum C Programming
    Replies: 12
    Last Post: 12-14-2004, 12:33 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21