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

  1. Path: sparky!uunet!usc!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!sgiblab!troi!steve
  2. From: steve@dbaccess.com (Steve Suttles)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Unsolveable bug
  5. Message-ID: <131@mccoy.dbaccess.com>
  6. Date: 8 Jan 93 04:14:20 GMT
  7. References: <204@zurich.spectrospin.ch>
  8. Organization: Cross Access Corp., Santa Clara, CA
  9. Lines: 27
  10. X-Newsreader: Tin 1.1 PL4
  11.  
  12. A somewhat less drastic approach might be to install printfs every
  13. so often and see which ones run.  Narrow down the failure to one line
  14. of code, and examine all values carefully.
  15.  
  16. I've experienced your symptoms several times, and each time it boiled
  17. down to a variable that did not get initialized, and inherited
  18. whatever value that memory cell had in it.  When I ran with the
  19. debugger, it inherited a different value, which altered the behavior.
  20. You may find that modifications to your program of any kind alter the
  21. behavior, but this is consistent (putting in printfs does change the
  22. runtime stack, after all...)
  23.  
  24. Forget about bugs in malloc implementation.  They would have been
  25. found.  While your mistake might be in the area of malloc'ed memory,
  26. it is a mistake in the requests that were made, rather than the
  27. fulfillment of those requests.  But if you honestly believe you
  28. haven't messed up with malloc, don't give up; keep looking until you
  29. find it.  Computers only do what they are told, after all...
  30.  
  31. When one is discovered that doesn't, it gets sent out to be fixed.
  32.  
  33. sas
  34. -- 
  35. Steve Suttles                Internet:  steve@dbaccess.com      Dr. DCL is IN!
  36. CROSS ACCESS Corporation     UUCP: {uunet,sgiblab}!troi!steve  Yo speako TECO!
  37. 2900 Gordon Ave, Suite 100   fax: (408) 735-0328              Talk data to me!
  38. Santa Clara, CA 95051-0718   vox: (408) 735-7545   HA! It's under 4 lines NOW!
  39.