* [PATCH] Fix logging segfaults on amd64
@ 2007-10-21 11:02 Steinar H. Gunderson
2007-10-22 13:47 ` Kevin Coffman
2007-11-03 12:51 ` Steve Dickson
0 siblings, 2 replies; 4+ messages in thread
From: Steinar H. Gunderson @ 2007-10-21 11:02 UTC (permalink / raw)
To: nfs
Hi,
It seems an error crept into nfs-utils 1.1.1 just before release, so exportfs
-r segfaults on amd64 whenever there is a warning. The attached patch, from
Steve Langasek, fixes the issue (an abuse of va_list).
Signed-off-by: Steinar H. Gunderson <sesse@debian.org>
Signed-off-by: Steve Langasek <vorlon@debian.org>
--- nfs-utils-1.1.1.orig/support/nfs/xlog.c
+++ nfs-utils-1.1.1/support/nfs/xlog.c
@@ -133,9 +133,13 @@ xlog_enabled(int fac)
void
xlog_backend(int kind, const char *fmt, va_list args)
{
+ va_list args2;
+
if (!(kind & (L_ALL)) && !(logging && (kind & logmask)))
return;
+ va_copy(args2, args);
+
if (log_syslog) {
switch (kind) {
case L_FATAL:
@@ -172,10 +176,12 @@ xlog_backend(int kind, const char *fmt,
fprintf(stderr, "%s: ", log_name);
#endif
- vfprintf(stderr, fmt, args);
+ vfprintf(stderr, fmt, args2);
fprintf(stderr, "\n");
}
+ va_end(args2);
+
if (kind == L_FATAL)
exit(1);
}
/* Steinar */
--
Homepage: http://www.sesse.net/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Fix logging segfaults on amd64
2007-10-21 11:02 [PATCH] Fix logging segfaults on amd64 Steinar H. Gunderson
@ 2007-10-22 13:47 ` Kevin Coffman
2007-11-03 12:51 ` Steve Dickson
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Coffman @ 2007-10-22 13:47 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: nfs
On 10/21/07, Steinar H. Gunderson <sesse@debian.org> wrote:
> Hi,
>
> It seems an error crept into nfs-utils 1.1.1 just before release, so exportfs
> -r segfaults on amd64 whenever there is a warning. The attached patch, from
> Steve Langasek, fixes the issue (an abuse of va_list).
Thanks, I discovered this on Thursday and came up with the same
solution on Friday. I was going to send it on today.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix logging segfaults on amd64
2007-10-21 11:02 [PATCH] Fix logging segfaults on amd64 Steinar H. Gunderson
2007-10-22 13:47 ` Kevin Coffman
@ 2007-11-03 12:51 ` Steve Dickson
2007-11-03 14:36 ` Steinar H. Gunderson
1 sibling, 1 reply; 4+ messages in thread
From: Steve Dickson @ 2007-11-03 12:51 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: nfs
Steinar H. Gunderson wrote:
> Hi,
>
> It seems an error crept into nfs-utils 1.1.1 just before release, so exportfs
> -r segfaults on amd64 whenever there is a warning. The attached patch, from
> Steve Langasek, fixes the issue (an abuse of va_list).
>
> Signed-off-by: Steinar H. Gunderson <sesse@debian.org>
> Signed-off-by: Steve Langasek <vorlon@debian.org>
>
> --- nfs-utils-1.1.1.orig/support/nfs/xlog.c
> +++ nfs-utils-1.1.1/support/nfs/xlog.c
> @@ -133,9 +133,13 @@ xlog_enabled(int fac)
> void
> xlog_backend(int kind, const char *fmt, va_list args)
> {
> + va_list args2;
> +
> if (!(kind & (L_ALL)) && !(logging && (kind & logmask)))
> return;
>
> + va_copy(args2, args);
> +
> if (log_syslog) {
> switch (kind) {
> case L_FATAL:
> @@ -172,10 +176,12 @@ xlog_backend(int kind, const char *fmt,
> fprintf(stderr, "%s: ", log_name);
> #endif
>
> - vfprintf(stderr, fmt, args);
> + vfprintf(stderr, fmt, args2);
How is using args here "an abuse of va_list"? It seem pretty
straightforward to me...
steved.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-03 14:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-21 11:02 [PATCH] Fix logging segfaults on amd64 Steinar H. Gunderson
2007-10-22 13:47 ` Kevin Coffman
2007-11-03 12:51 ` Steve Dickson
2007-11-03 14:36 ` Steinar H. Gunderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.