In article <OF482D2677.F710B1E7-ONC2257026.00225630-C2257026.0022F49C / stonesoft.com>, ville.mattila / stonesoft.com writes: > This patch works correctly. It passes the ruby tests correctly. Could you > put this to CVS. Done. > Thanks for very intersting > gdb session and analysis. Maybe there is bug in somewhere in solaris > setjmp function family? In linux this works just fine. The problem is caused by a combination of gcc, getcontext/setcontext and SPARC (or IA64). So I think it can be caused on Linux/SPARC and Linux/IA64. It is reasonable that gcc expects registers in register window/stack is not changed across a function call. It is because register window/stack is a mechanism to save/restore registers automatically. It is reasonable that getcontext/setcontext doesn't preserve all registers. It makes the functions slower, especially on processors which have many registers. It is reasonable that processors have a special mechanism to make function call faster. So I'm not sure what is wrong. However I think gcc is the most proper target to have a workaround for the problem because gcc already knows setjmp may return twice. -- Tanaka Akira