[gnu.utils.bug] bug in context diff code in gnu diff

arnold@unix.cc.emory.edu (Arnold D. Robbins) (09/19/89)

Something is flaky in the context diff code in gnu diff.  The following
script shows the problem.  The line at 410 which is marked for deletion
is actually still there in the new version of the file.  A regular diff
comes out correctly, oddly enough.

Script started on Mon Sep 18 19:42:35 1989
emoryu1> diff -c diff/awk.h awk.h
*** diff/awk.h	Wed Aug 23 17:13:53 1989
--- awk.h	Mon Sep 18 17:53:54 1989
***************
*** 399,410 ****
  			((_t)->type == Node_val ? (_t) : r_tree_eval((_t))))
  #define	make_string(s,l)	make_str_node((s),(l),0)
  
- /*
-  * the val variable allows continue/break-out-of-context to be
-  * caught and diagnosed
-  */
- #define PUSH_BINDING(stack, x, val) (memcpy ((char *)(stack), (char *)(x), sizeof (jmp_buf)), val++)
- #define RESTORE_BINDING(stack, x, val) (memcpy ((char *)(x), (char *)(stack), sizeof (jmp_buf)), val--)
  
  #define	cant_happen()	fatal("line %d, file: %s; bailing out", \
- 				__LINE__, __FILE__);
--- 399,403 ----
emoryu1> diff diff/awk.h awk.h
401,407d400
< 
< /*
<  * the val variable allows continue/break-out-of-context to be
<  * caught and diagnosed
<  */
< #define PUSH_BINDING(stack, x, val) (memcpy ((char *)(stack), (char *)(x), sizeof (jmp_buf)), val++)
< #define RESTORE_BINDING(stack, x, val) (memcpy ((char *)(x), (char *)(stack), sizeof (jmp_buf)), val--)
emoryu1>

script done on Mon Sep 18 19:42:52 1989
--
Arnold Robbins -- Emory University Computing Center | Laundry increases
DOMAIN: arnold@emoryu1.cc.emory.edu		    | exponentially in the
UUCP: gatech!emoryu1!arnold  PHONE: +1 404 727-7636 | number of children.
BITNET: arnold@emoryu1	     FAX:   +1 404 727-2599 |     -- Miriam Hartholz