home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19313 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  2.6 KB

  1. Path: sparky!uunet!mcsun!chsun!zurich!gegu
  2. From: gegu@zurich.spectrospin.ch (Gerry Gucher)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Unsolveable bug
  5. Summary: malloc problem is probably a programmer problem
  6. Message-ID: <204@zurich.spectrospin.ch>
  7. Date: 6 Jan 93 16:16:19 GMT
  8. References: <1hq27eINNjv@uwm.edu>
  9. Organization: Spectrospin AG, Fallanden Switzerland
  10. Lines: 46
  11.  
  12. In article <1hq27eINNjv@uwm.edu>, markh@csd4.csd.uwm.edu (Mark) writes:
  13. >    I've run into an unsolveable bug.  The bug comes from no visible error, it
  14. > disappears when searched for under a debugger, and it's likewise non-existent
  15. > when the same program is run under other platforms and compilers.  And it
  16. > doesn't involve anything having to do with timing of any sort.
  17. >    It appears on the DOS port of the program and causes the machine to crash
  18. > immediately after a call to malloc().  The malloc call is the ANSI-compatible
  19. > call, declared with the <stdlib.h> header.  The particular usage leading to
  20. > the crash is (as determined by traces): malloc(16), malloc(16), malloc(20), ...
  21. > with no intervening free() calls.  All calls to malloc() return valid pointers.
  22. > Checking the memory usage reveals no corruption or access out of bounds.
  23.  
  24. You probably haven't checked carefully enough.
  25.  
  26. >    The compiler creating the problem has had reliable error-free performance
  27. > with other similar programs.
  28.  
  29. Have you also checked the programmer for reliable error-free performance with
  30. other similar programs ?
  31.  
  32. It would help much if you could could state the kind of system and OS you are
  33. using. Code might help too, but its unlikely because the source of the error
  34. is probably far away from the place where the crash occurred.
  35.  
  36. If you are working on a Sun workstation do yourself a favor and
  37. use "malloc_debug" and if this not sufficient get a copy of the "Purify" 
  38. package from Pure Software (CA +(408) 720-1600). Price is approx. ~1900
  39. UK pounds. I don't know the price in US$. 
  40.  
  41. I have no relationship to "Pure" except being a satisfied customer. (This is
  42. quite tough to achieve).
  43.  
  44. Gerry
  45.  
  46.  
  47. +------------------------------------------------------------------+
  48. | Gerry Gucher                             gegu@spectrospin.ch       |
  49. | Spectrospin AG,  Industriestr 26,  8117  Faellanden Switzerland  | 
  50. +------------------------------------------------------------------+
  51. | A program that  returns the  wrong | There is nothing wrong with |
  52. | result twice as fast is infinitely | making  mistakes,  but make |
  53. | slower.               - H. Spencer | new ones.           - D.Sim |    
  54. +------------------------------------------------------------------+
  55.