Author: nwhitehorn
Date: Tue Apr 10 13:37:43 2012
New Revision: 234097
URL: http://svn.freebsd.org/changeset/base/234097
Log:
MFC r234003:
Properly resolve the _ctx_start function descriptor (the symbol _ctx_start
is a descriptor, not a code address), which prevents crashes when starting
a context. This fixes QEMU on powerpc64.
Modified:
stable/9/lib/libc/powerpc64/gen/makecontext.c
Directory Properties:
stable/9/lib/libc/ (props changed)
Modified: stable/9/lib/libc/powerpc64/gen/makecontext.c
==============================================================================
--- stable/9/lib/libc/powerpc64/gen/makecontext.c Tue Apr 10 13:31:38
2012 (r234096)
+++ stable/9/lib/libc/powerpc64/gen/makecontext.c Tue Apr 10 13:37:43
2012 (r234097)
@@ -111,7 +111,7 @@ __makecontext(ucontext_t *ucp, void (*st
* Use caller-saved regs 14/15 to hold params that _ctx_start
* will use to invoke the user-supplied func
*/
- mc->mc_srr0 = (uintptr_t) _ctx_start;
+ mc->mc_srr0 = *(uintptr_t *)_ctx_start;
mc->mc_gpr[1] = (uintptr_t) sp; /* new stack pointer */
mc->mc_gpr[14] = (uintptr_t) start; /* r14 <- start */
mc->mc_gpr[15] = (uintptr_t) ucp; /* r15 <- ucp */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"