On Sat, Jul 21, 2001 at 03:12:49PM +0000, Giora Engel wrote:
> Please try this bigger file.

Please try version 0.6.2 of libpcap.  If it crashes only in 0.5,
but doesn't crash in 0.6.2, it's probably the bug in question, in which
case...

> If it doesn't crash I'll try to diff the versions.
> Does anybody know where can I find some documentation about the compilation 
> and optimization code (so that I can debug this code)?

...there's no debugging needed; just merge the fix into the WinPcap code
(or just upgrade the WinPcap code to 0.6.2, and send the results back to
the WinPcap folks for use in some future release).

The fix is in revision 1.66 to "optimize.c":

Index: optimize.c
===================================================================
RCS file: /tcpdump/master/libpcap/optimize.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -c -r1.65 -r1.66
*** optimize.c  2000/10/28 00:01:27     1.65
--- optimize.c  2000/10/28 01:22:53     1.66
***************
*** 1782,1787 ****
--- 1782,1801 ----
  /*
   * Return the number of stmts in the flowgraph reachable by 'p'.
   * The nodes should be unmarked before calling.
+  *
+  * Note that "stmts" means "instructions", and that this includes
+  *
+  *    side-effect statements in 'p' (slength(p->stmts));
+  *
+  *    statements in the true branch from 'p' (count_stmts(JT(p)));
+  *
+  *    statements in the false branch from 'p' (count_stmts(JF(p)));
+  *
+  *    the conditional jump itself (1);
+  *
+  *    an extra long jump if the true branch requires it (p->longjt);
+  *
+  *    an extra long jump if the false branch requires it (p->longjf).
   */
  static int
  count_stmts(p)
***************
*** 1793,1799 ****
                return 0;
        Mark(p);
        n = count_stmts(JT(p)) + count_stmts(JF(p));
!       return slength(p->stmts) + n + 1;
  }
  
  /*
--- 1807,1813 ----
                return 0;
        Mark(p);
        n = count_stmts(JT(p)) + count_stmts(JF(p));
!       return slength(p->stmts) + n + 1 + p->longjt + p->longjf;
  }
  
  /*

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to