Make sure that sensible values are extracted from a raw header.
This commit is contained in:
parent
d3426803c5
commit
2d35e9f64f
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
1999-09-24 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
|
* gmon_io.c (gmon_out_read): Make sure that sensible values
|
||||||
|
are extracted from a raw header.
|
||||||
|
|
||||||
1999-08-06 Ian Lance Taylor <ian@zembu.com>
|
1999-08-06 Ian Lance Taylor <ian@zembu.com>
|
||||||
|
|
||||||
From Brad Lucier <lucier@math.purdue.edu>:
|
From Brad Lucier <lucier@math.purdue.edu>:
|
||||||
|
|
|
@ -251,6 +251,15 @@ DEFUN (gmon_out_read, (filename), const char *filename)
|
||||||
printf ("[gmon_out_read] samp_bytes %d hist_num_bins %d\n",
|
printf ("[gmon_out_read] samp_bytes %d hist_num_bins %d\n",
|
||||||
samp_bytes, hist_num_bins));
|
samp_bytes, hist_num_bins));
|
||||||
|
|
||||||
|
/* Make sure that we have sensible values. */
|
||||||
|
if (samp_bytes < 0 || lowpc > highpc)
|
||||||
|
{
|
||||||
|
fprintf (stderr,
|
||||||
|
_("%s: file '%s' does not appear to be in gmon.out format\n"),
|
||||||
|
whoami, filename);
|
||||||
|
done (1);
|
||||||
|
}
|
||||||
|
|
||||||
if (hist_num_bins)
|
if (hist_num_bins)
|
||||||
{
|
{
|
||||||
++nhist;
|
++nhist;
|
||||||
|
|
Loading…
Add table
Reference in a new issue