lkml.org 
[lkml]   [2004]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectvar args in kernel?
On Fri, Nov 19, 2004 at 02:41:46PM -0700, Kevin P. Fleming wrote:
> Gerd Knorr wrote:
> >Yet another kobject bug. It uses the varargs list twice in a illegal
> >way. That doesn't harm on i386 by pure luck, but blows things up on
> >amd64 machines. The patch below fixes it.
>
> Is this safe? The normal glibc varargs implementation says you can't
> even call va_start on the same args list twice, you have to use va_copy
> to make a clone and then call va_start on that, _before_ you ever call
> va_start the first time.

Hmm, maybe. I'm not sure who actually implements the varargs (gcc?
Or glibc/kernel?) and whenever the above applies to the kernel as well
or not ...

Cc'ing the kernel list for comments.

Gerd

--
#define printk(args...) fprintf(stderr, ## args)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.077 / U:7.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site