Request for review: 6749267: Signal handler should save/restore errno
harold seigel
harold.seigel at oracle.com
Mon Feb 18 07:58:34 PST 2013
Hi Karen,
Thanks for reviewing this. The existing SR_handlers for both linux and
bsd already save and restore errno:
static void SR_handler(int sig, siginfo_t* siginfo, ucontext_t*
context) {
// Save and restore errno to avoid confusing native code with EINTR
// after sigsuspend.
int old_errno = errno;
...
Harold
On 2/18/2013 10:51 AM, Karen Kinnear wrote:
> Harold,
>
> Thank you for doing this.
>
> I think you also want to catch SR_handler - this is our suspend/resume handler. Today this is on
> linux and bsd. An upcoming change will use that handler for more than just the VM Thread, and will support it on Solaris as well.
> Copying Rickard/Staffan who will want to extend this change for the Solaris SR_handler when it arrives.
>
>
> On Feb 18, 2013, at 9:07 AM, harold seigel wrote:
>
>> Hi,
>>
>> Please review the following change.
>>
>> Summary: With this change, the actual signal handler saves the errno before calling the function that does most of the signal handling processing. It then restores the value of errno when the signal handling processing function returns.
>>
>> Open webrev: http://cr.openjdk.java.net/~hseigel/bug_6749267/ <http://cr.openjdk.java.net/%7Ehseigel/bug_6749267/>
>>
>> Bug link at: https://jbs.oracle.com/bugs/browse/JDK-6749267
>>
>> The changes were tested with JPRT, JCK Lang and VM tests, UTE tests, and with JPRT. Also, I used the debugger to change the value of errno inside of the signal handling processing method and then verified that it got restored properly.
> Thank you for reporting what tests you ran. UTE tests - could you be more specific, that is just the framework.
>
> We have some existing signal tests in the vmsqe tests - see runtime/signal/*.
>> Thanks! Harold
> thanks,
> Karen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130218/2f8e19a5/attachment-0001.html
More information about the hotspot-runtime-dev
mailing list