Orphaned Response

keenan at inmet.UUCP keenan at inmet.UUCP
Wed May 29 08:19:00 AEST 1985



I ran into the same problems you did (long name and core dump with
patch on BSD2.9).  Its scarry having a core dump in a 1700 line program
you know nothing about. With lots of print statements, I tracked it
down. Seems that the 2.9 compiler has problems with longs being
autodecremented within an array reference. The decrement takes place as
if it was an integer.  Putting the decrement on the next line seems to
fix the problem.  Here is a context diff (that you could apply if patch
worked!) for the core dump problem.  The problem that I found was in
the routine another_hunk. Let me know of others.

*** oldpatch.c	Sun May 26 18:14:49 1985
--- patch.c	Sun May 26 21:03:19 1985
***************
*** 1342,1348
      int context = 0;
  
      while (p_end >= 0) {
! 	free(p_line[p_end--]);
      }
      assert(p_end == -1);
  

--- 1342,1349 -----
      int context = 0;
  
      while (p_end >= 0) {
! 	free(p_line[p_end]);		/* Changed from postdecrement */
! 	p_end--;			/* by Keenan Ross for BSD2.9  */
      }
      assert(p_end == -1);
  

--keenan ross		UUCP:     {ihnp4,harpo}!inmet!keenan
 Intermetrics, Inc.	INTERNET: ima!inmet!keenan at CCA-UNIX.ARPA
 733 Concord Ave.
 Cambridge, MA  02138	PHONE:    (617) 661-1840



More information about the Comp.sources.bugs mailing list