Message-ID: <E74B412A1B5FD211AD6C0000F87C38ADBC6250@ozyexc1.itg.qvar.cpqcorp.net> From: Matt Muggeridge <Matt.Muggeridge@compaq.com> Subject: tcptrace-bugs mod_rttgraph.c - bug Date: Tue, 21 May 2002 14:13:37 +1000
Hi,
I've ported tcptrace to HP OpenVMS and have been running it for several
weeks. Great tool! Today I was playing around with the "-xrttgraph" module
and hit an access violation. After taking a look at the code, I added a
check for divide-by-zero to PlotHist(). I didn't study whether the
preconditions to the PlotHist() routine should be such that a divide-by-zero
error should never happen, but after adding the check it ran to completion.
Here's the code diffs, which are contained in routine PlotHist():
$ diff mod_rttgraph.c
************
File DATA:[TEST.TCPTRACE]MOD_RTTGRAPH.C;2
415 float percent;
416
417 if (count == 0 || phist->num_samples == 0)
418 continue;
419
420 percent = (float)count / phist->num_samples;
421
******
File DATA:[TEST.TCPTRACE]MOD_RTTGRAPH.C;1
415 float percent = (float)count / phist->num_samples;
416 if (count == 0)
417 continue;
418
************
Number of difference sections found: 1
Number of difference records found: 6
DIFFERENCES /IGNORE=()/MERGED=1-
DATA:[TEST.TCPTRACE]MOD_RTTGRAPH.C;2-
DATA:[TEST.TCPTRACE]MOD_RTTGRAPH.C;1
Matt.
This archive was generated by hypermail 2b30 : 05/21/02 EDT