--with-threads=ucontext portability (was Re: [stunnel-users] stunnel4.x.x and IRIX)
Michal Trojnara
Michal.Trojnara at mobi-com.net
Tue Jan 31 10:41:37 CET 2006
Miloslav Trmac wrote:
> I have just seen a crash at a similar place on x86_64. The
> apparent cause is sthreads.c:116:
> makecontext(&ctx->ctx, (void(*)(void))cli, 1, arg); arg
> is a void *, but:
> - the size is given as 1; it should be
> (sizeof (arg) + sizeof (int) - 1) / sizeof (int)
> because the "size" is defined as a number of int arguments
> - it won't work anyway; makecontext () is defined to work only for
> integer parameters. It is not possible to pass a pointer as
> integers on x86_64, which uses registers to pass the first 6
> integer or pointer parameters.
Are we still talking about IRIX?
http://nixdoc.net/man-pages/IRIX/man3c/makecontext.3c.html
I can't find any of mentioned limitations in the manual.
Just the opposite: "the arguments that follow the argc parameter for
makecontext are restricted to longs and pointers only".
Best regards,
Mike
More information about the stunnel-users
mailing list