summaryrefslogtreecommitdiffstats
path: root/lib/libc/amd64
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-09-04 00:20:40 +0000
committerpeter <peter@FreeBSD.org>2003-09-04 00:20:40 +0000
commitcc367e4b541a4b5a33b6ecdddeb71bd9ef3cc696 (patch)
tree027ce531bcebb6982910578332fd2d4e6ef18d24 /lib/libc/amd64
parent919bc52171f32bfe264b987934e1055b6901ac6d (diff)
downloadFreeBSD-src-cc367e4b541a4b5a33b6ecdddeb71bd9ef3cc696.zip
FreeBSD-src-cc367e4b541a4b5a33b6ecdddeb71bd9ef3cc696.tar.gz
Make getcontext(2) work on i386. It needs a small wrapper in libc
otherwise the return from the syscall stub for getcontext will pop off the return value for the caller to the getcontext stub and it will appear as though the setcontext() syscall returned instead of the getcontext(). The same bug exists on amd64, a fix is coming there too. The bug can be demonstrated with this test code fragment: main() { ucontext_t top; if (getcontext(&top) == 0) { write(2, "PING!\n", 6); /* Cause a return value of 1 from getcontext this time */ top.uc_mcontext.mc_eax = 1; setcontext(&top); err(1, "setcontext() returned"); } write(2, "PONG!\n", 6); _exit(0); }
Diffstat (limited to 'lib/libc/amd64')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud