bin/72366: syslog overflow fix
Chris Gabe
chris at borderware.com
Wed Oct 6 01:50:25 PDT 2004
The following reply was made to PR bin/72366; it has been noted by GNATS.
From: Chris Gabe <chris at borderware.com>
To: freebsd-gnats-submit at FreeBSD.org,
Chris Gabe <chris at borderware.com>
Cc:
Subject: Re: bin/72366: syslog overflow fix
Date: Wed, 6 Oct 2004 04:46:29 -0400
In my original description of how to reproduce, I didn't mention that
the syslog lines should include a loop counter to avoid the telescoping
of repeated lines. Here is a test program:
#include <sys/syslog.h>
main(argc, argv)
int argc;
char **argv;
{
char *name;
int i, maxi;
maxi = atoi(argv[1]);
name = (char *)strdup(argv[2]);
for (i=0; i<maxi; i++) {
syslog(LOG_INFO,"%s %d",name,i);
}
}
Invoke something like
test 1000000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
test 1000000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
test 1000000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
test 1000 bbbbbbbbbbbbbbbbbbbbbbb
killall test
grep bbbbb /var/log/message | wc
More information about the freebsd-bugs
mailing list