From d62085e5c5eb47cc2442899b125c799cb90e6d7b Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 6 Apr 2012 21:17:05 +0200 Subject: Do not take address of va_list variable This breaks on x86_64, where it is an array and thus gets bogus results. * ddb/db_output.c (db_printf, kdbprintf): Pass copy of va_list variable instead of its address. * kern/debug.c (panic, log): Likewise. * kern/printf.c (vprintf, iprintf, sprintf, vsnprintf): Likewise. (_doprnt): Take va_list instead of va_list *, fix usage and comment accordingly. * kern/printf.h (_doprnt): Take va_list instead of va_list *. --- ddb/db_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ddb') diff --git a/ddb/db_output.c b/ddb/db_output.c index 57d6856..3ea2caa 100644 --- a/ddb/db_output.c +++ b/ddb/db_output.c @@ -213,7 +213,7 @@ db_printf(const char *fmt, ...) db_printf_enter(); /* optional multiP serialization */ #endif va_start(listp, fmt); - _doprnt(fmt, &listp, db_id_putc, db_radix, 0); + _doprnt(fmt, listp, db_id_putc, db_radix, 0); va_end(listp); } @@ -225,7 +225,7 @@ kdbprintf(const char *fmt, ...) { va_list listp; va_start(listp, fmt); - _doprnt(fmt, &listp, db_id_putc, db_radix, 0); + _doprnt(fmt, listp, db_id_putc, db_radix, 0); va_end(listp); } -- cgit v1.2.3