[stunnel-users] RE: --with-threads=ucontext portability
Miloslav Trmac
mitr at redhat.com
Tue Jan 31 16:05:19 CET 2006
Michal Trojnara wrote:
> What about the number of arguments? Why isn't "1" correct?
Assume the traditional way of passing arguments on stack, with "int"
naturally aligned. Then makecontext does something like this:
- set stack pointer to "top" - argc * sizeof(int)
- copy argc * sizeof (int) bytes from makecontext() arguments to stack
- set up the rest of the frame
If sizeof (void *) > sizeof (int), which happens on 64-bit platforms,
the above doesn't copy the whole value of the pointer when argc == 1.
Mirek
More information about the stunnel-users
mailing list