Index: CHANGES.txt =================================================================== RCS file: /sources/monit/monit/CHANGES.txt,v retrieving revision 1.296 retrieving revision 1.298 diff -u -r1.296 -r1.298 --- CHANGES.txt 27 Apr 2006 21:48:34 -0000 1.296 +++ CHANGES.txt 4 May 2006 23:54:33 -0000 1.298 @@ -1,7 +1,18 @@ - CHANGES version 4.8 + CHANGES version 4.8.1 This file summarizes changes made since 3.0 +Version 4.8.1 + +BUGFIXES: +* Fix the RHEL4 x86-64 related crash in logging introduced + in 4.8. This problem may probably occur on other Opteron + based platforms as well. Thanks to Mike Jackson + ( mjackson mightymerchant , com ) for report and helping + with the patch. This fix should also apply to 64-bit PPC + platforms as well. + + Version 4.8 NEW FEATURES AND FUNCTIONS: Index: log.c =================================================================== RCS file: /sources/monit/monit/log.c,v retrieving revision 1.27 retrieving revision 1.30 diff -u -r1.27 -r1.30 --- log.c 27 Apr 2006 20:56:41 -0000 1.27 +++ log.c 4 May 2006 23:50:03 -0000 1.30 @@ -80,7 +80,7 @@ * * @author Jan-Henrik Haukeland, * - * @version \$Id: log.c,v 1.27 2006/04/27 20:56:41 martinp Exp $ + * @version \$Id: log.c,v 1.30 2006/05/04 23:50:03 martinp Exp $ * * @file */ @@ -359,10 +359,20 @@ */ static void log_log(int priority, const char *s, va_list ap) { +#ifdef HAVE_VA_COPY + va_list ap_copy; +#endif + ASSERT(s); LOCK(log_mutex) +#ifdef HAVE_VA_COPY + va_copy(ap_copy, ap); + vfprintf(stderr, s, ap_copy); + va_end(ap_copy); +#else vfprintf(stderr, s, ap); +#endif fflush(stderr); END_LOCK; @@ -371,15 +381,28 @@ if(Run.use_syslog) { LOCK(log_mutex) +#ifdef HAVE_VA_COPY + va_copy(ap_copy, ap); + vsyslog(priority, s, ap_copy); + va_end(ap_copy); +#else vsyslog(priority, s, ap); +#endif END_LOCK; } else if(LOG) { LOCK(log_mutex) fprintf(LOG, "[%s] %-8s : ", timefmt(datetime, STRLEN), logPriorityDescription(priority)); +#ifdef HAVE_VA_COPY + va_copy(ap_copy, ap); + vfprintf(LOG, s, ap_copy); + va_end(ap_copy); +#else vfprintf(LOG, s, ap); +#endif END_LOCK; + } } }