home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / bugs / 83 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  2.0 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!olivea!sgigate!odin!twilight!zuni!anchor!olson
  2. From: olson@anchor.esd.sgi.com (Dave Olson)
  3. Newsgroups: comp.sys.sgi.bugs
  4. Subject: Re: libimage iopen() bug
  5. Message-ID: <ui373rk@zuni.esd.sgi.com>
  6. Date: 6 Jan 93 21:46:46 GMT
  7. References: <1993Jan6.200247.24300@netcom.com>
  8. Sender: news@zuni.esd.sgi.com (Net News)
  9. Organization: Silicon Graphics, Inc.  Mountain View, CA
  10. Lines: 41
  11.  
  12. In <1993Jan6.200247.24300@netcom.com> benoist@netcom.com (Tom Benoist) writes:
  13.  
  14. | Some wont consider this a bug.
  15. | I also understand that 4Dgifts is officially unsupported demoware.
  16.  
  17. Not really.  That is the same source used to build libimage.a
  18.  
  19. | Anyway, the problem:
  20. | /usr/people/4Dgifts/iristools/libimage/open.c
  21. | If iopen() fails because its not sent a readable file
  22. | in the proper format, it returns without:
  23. | 1. Freeing up Memory it allocates using calloc
  24. | 2. closing the file descriptor  
  25.  
  26. That's because the original behavior was to exit on that
  27. error.  When I added the ability to trap the error and
  28. call a user function and continue, I missed the free
  29. (although I did catch and fix others...)
  30.  
  31. If the file isn't readable, the open fails, and there
  32. *is* no file descriptor to close!
  33.  
  34. | The result is that using this code in an app that queries the
  35. | user for filenames, you run the good chance of eventually
  36. | running over the Max Limit of 100 for open files.  As we all
  37. | know, after that point File IO basically stops working and
  38. | your app becomes "quite impotent"
  39.  
  40. Nope, something else is going on here.  If you
  41. meant a file that can be opened, but then the read of the
  42. image header fails (or a write fails because the system
  43. runs out of free space), you are right.
  44.  
  45. I'll file a bug on this, so it will be fixed for a future
  46. release.
  47. --
  48. Let no one tell me that silence gives consent,  |   Dave Olson
  49. because whoever is silent dissents.             |   Silicon Graphics, Inc.
  50.     Maria Isabel Barreno                        |   olson@sgi.com
  51.