|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Richard Henderson (rth
REDHAT.COM)Date: Thu Apr 05 2001 - 15:12:18 CDT
On Thu, Apr 05, 2001 at 12:57:27PM -0700, Zack Weinberg wrote:
> Aaargh.
Yeah. Anyway, just counting the number of arguments doesn't really do
the job here. You also have to know what type the passed arguments were.
If the target uses fp registers for fp data, and integer registers for
pointer data, or data registers for integer data and address registers
or pointer data, or .... Then you can still feed uninitialized values
to printf by having a type mismatch between the format string and the
actual parameters. Multiple sets of counts don't do the job because the
calling convention might leave holes in the registers that it uses.
The only solution is an array of data as by __builtin_classify_type for
each passed parameter.
r~
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]