[OpenAFS-devel] Re: Problem with IP address based ACL?
Joe Buehler
jbuehler@spirentcom.com
Wed, 21 Jun 2006 12:33:23 -0400
Jeffrey Altman wrote:
> ubik_Call() does provide a prototype because it is used as a
> pseudo-vararg function.
>
> afs_int32
> ubik_Call(int (*aproc) (), struct ubik_client *aclient,
> afs_int32 aflags, long p1, long p2, long p3, long p4,
> long p5, long p6, long p7, long p8, long p9,
> long p10, long p11, long p12, long p13, long p14,
> long p15, long p16)
>
> But what happens when the parameters that are being passed into
> ubik_Call for later use by 'aproc' do not have the same size as
> a 'long'? In that case the alignment of parameters on the stack
This is perilous for other reasons. On AIX, for example, my recollection
is that the first 8 parameters of a given type (float or int) are passed
in registers -- and floats and ints go into different registers. If there
are floats involved the above method of doing varargs may fail badly because
the registers will get all confused.
I would say that the faster this sort of thing gets removed, the better --
it is based on ABI assumptions that are not valid for all machines.
--
Joe Buehler