RFR: JDK-8068028 - JNI exception pending in jdk/src/solaris/native/java/net

Jim Graham james.graham at oracle.com
Wed Jan 21 22:18:31 UTC 2015


If another engineer decides in the future that one more thing needs to 
be done in that function and goes to the end of it and appends more code 
then all of this careful reasoning will disappear and the problem will 
surface...

			...jim

On 1/21/15 1:55 PM, Mark Sheppard wrote:
> Hi Sean,
>      you could put one in, but the JNI call is the last statement in the
> function, so the CHECK_NULL would be
> superfluous as the return from the function is executed next, as as such
> there is no possible conflict with another JNI call
> at that point.
>
> 230     ni_defaultIndexID = (*env)->GetStaticFieldID(env, ni_class,
> "defaultIndex", "I");
> 231 }
>
>
>
> Maybe for consistency and style?
>
> I did amend a couple of minor issues in NetworkInterface.c
>
> regards
> Mark
> On 21/01/2015 21:48, Seán Coffey wrote:
>> Hi Mark,
>>
>> does line 230 in NetworkInterface.c still need a NULL check ?
>>
>> regards,
>> Sean.
>>
>>>   230     ni_defaultIndexID = (*env)->GetStaticFieldID(env, ni_class,
>>> "defaultIndex", "I");
>>
>> On 21/01/2015 21:42, Chris Hegarty wrote:
>>>> On 21 Jan 2015, at 21:11, Mark Sheppard <mark.sheppard at oracle.com>
>>>> wrote:
>>>>
>>>> update webrev with  suggested amendments
>>>> http://cr.openjdk.java.net/~msheppar/8068028/webrev.02/
>>> Looks good Mark.
>>>
>>> -Chris.
>>>
>>>> regards
>>>> Mark
>>>>
>>>>> On 21/01/2015 17:33, Seán Coffey wrote:
>>>>> Hi Mark,
>>>>>
>>>>> does line 121 in net_util_md.c also require a NULL check ?
>>>>> While we're here, what about line 230 in
>>>>> src/solaris/native/java/net/NetworkInterface.c ?
>>>>>
>>>>> For the Inet6AddressImpl.c change, do you need to call
>>>>> cleanupAndReturn like the Inet4 implementation ?
>>>>>
>>>>> regards,
>>>>> Sean.
>>>>>
>>>>>> On 21/01/15 17:11, Mark Sheppard wrote:
>>>>>> Hi
>>>>>>   please oblige and review the following changes
>>>>>> http://cr.openjdk.java.net/~msheppar/8068028/webrev/
>>>>>> which address the issue
>>>>>> https://bugs.openjdk.java.net/browse/JDK-8068028
>>>>>>
>>>>>> CHECK_NULL added to JNI function call  returns in
>>>>>> src/solaris/native/java/net/Inet6AddressImpl.c
>>>>>> src/solaris/native/java/net/net_util_md.c
>>>>>>
>>>>>> regards
>>>>>> Mark
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>
>


More information about the jdk8u-dev mailing list