RFR: 8038296 sun/tools/jinfo/Basic.sh: java.io.IOException: Command failed in target VM

Staffan Larsen staffan.larsen at oracle.com
Tue Mar 25 07:49:17 UTC 2014


Thanks Sundar!

On 25 mar 2014, at 08:36, A. Sundararajan <sundararajan.athijegannathan at oracle.com> wrote:

> Looks good.
> 
> -Sundar
> 
> On Tuesday 25 March 2014 01:01 PM, Staffan Larsen wrote:
>> attachListener_solaris.cpp calls atoi() and then checks errno to see if any errors occurred. The problem is that atoi() does not set errno, so some old value of errno is checked which sometimes causes the function to fail.
>> 
>> The fix is to replace atoi() with strtol() which does set errno. But errno is only set if an error occurred and not set to 0 in case of success. Thus, I set errno to 0 before calling strtol() and check the value afterwards.
>> 
>> Verified with a JPRT run.
>> 
>> webrev: http://cr.openjdk.java.net/~sla/8038296/webrev.00/
>> bug: https://bugs.openjdk.java.net/browse/JDK-8038296
>> 
>> Thanks,
>> /Staffan
> 



More information about the serviceability-dev mailing list