NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-sh3/49597: swapcontext(3) stack pointer problem on NetBSD/sh3
The following reply was made to PR port-sh3/49597; it has been noted by GNATS.
From: Yasushi Oshima <oshima-ya%yagoto-urayama.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: port-sh3/49597: swapcontext(3) stack pointer problem on
NetBSD/sh3
Date: Wed, 28 Jan 2015 23:46:02 +0900 (JST)
> From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
> Thanks, I have applied the patch. But it's got me thinking... We are
> tweaking oucp to resume "returning" from swapcontext, but we have
> already clobbered r12 and pr before/by calling getcontext, so oucp
> will get resumed with wrong r12 and pr values.
Ah!
Yes, certainly, resuming r12 will be necessary. I forgot it.
> It probably goes
> undetected since the caller saves and restores pr itself (since it
> calls swapcontext at least) and since r12 is not used because the test
> is not in a DSO.
I try your patch,
then, the atf-test in lib/libpthread/t_swapcontext
became to work well! (this test-case has failed yet with my patch.)
> though I haven't tested error legs.
It will be not enough but I tests very simple test:
swapcontext(NULL,&ucp)
It returns -1 with errno=14(EFAULT), its ok.
Thank you very much.
--
Yasushi Oshima
Home |
Main Index |
Thread Index |
Old Index