On 11 March 2015 at 15:43, Vernon Everett <user-b3f8dacb72c8@xymon.invalid>
wrote:
We have 4.3.12
And the command dumps core in the same way.
That's good.
Can you try this out? Plop into a text file, eg test.c, then "make test"
and then "./test".
#include <stdio.h>
#include <stdarg.h>
void dbgprintf(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stdout, fmt, args);
va_end(args);
fflush(stdout);
}
int main() {
dbgprintf("test: %s\n",NULL);
}
This is the essence of the Xymon code that prints the empty send/expect
strings. But I've pared away all of the Xymon code to leave just the call
to vprintf() and whatever is needed to make it run.
On my systems I get the following output:
test: (null)
I'm guessing on your system you'll get a core dump. If so, it would
suggest a difference in implementations of the standard library functions.
If that's the case, we simply (!) need to catch the attempts to print NULL
pointers, and substitute our own "(null)" string.
Indeed, I just tested this on a Solaris system and it dumped core. On
Linux and FreeBSD systems, it printed "(null)".
J