On Tue, Nov 04, 2008 at 03:53:57PM -0500, Jan Harkes wrote: > Yes, the libc version of makecontext is (was?) broken on amd64 and it > was corrupting pointers passed as arguments. I think the high bits of > the pointer were either cleared or filled with random data, not sure > anymore.
Actually, I've just read makecontext(3): When this context is later activated (using setcontext(2) or swapconâ text()) the function func is called, and passed the series of integer (int) arguments that follow argc; the caller must specify the number of these arguments in argc. When this function returns, the successor context is activated. If the successor context pointer is NULL, the thread exits. That sounds to me like it won't guarantee to pass a pointer around anyway, only an int. Keep in mind that sizeof(int) == 4 on AMD64 because it's an I32 LP64 platform. Passing a pointer here would only work on a IP32 or ILP64. -- Paul "LeoNerd" Evans [EMAIL PROTECTED] ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/
signature.asc
Description: Digital signature