Hi Mark,

Thanks for doing this, i see that "createNetworkInterface" method is getting called from multiple places in NetworkInterface.c there is pending JNI Exception at line 695 in NetworkInterface.c. I am not sure if it is safe to call "(*env)->ReleaseStringUTFChars" even if there is pending JNI Exception.

Thanks,

Vyom


On Tuesday 12 September 2017 10:50 PM, Mark Sheppard wrote:
Hi,
    please oblige and review the follows changes:
http://cr.openjdk.java.net/~msheppar/8023649/webrev/

for the issue:
https://bugs.openjdk.java.net/browse/JDK-8023649

This is performed under the auspices of reliability, robustness and stability.
* As such, a number of error checks are amended to free malloc-ed memory,
* to add consistency to the code, additional ExceptionCheck have been added as a post SetObjectArrayElement invocation check, * A long standing issue reporting that NetworkInterface::getInterfacesAddresses can throw an NPE has been addressed. The context for such a failure is that there is an IPv4 only configuration and that configuration is incorrect in its setting. This may lead to the bindings array being allocated, but expected InterfaceAddress objects not allocated and set in the array .... so the bindings array implicitly contains null references.

In NetworkInterface.c  the function
createNetworkInterface
performs a check on an address mask which may lead to skipping the code block handling the InterfaceAddress allocation.

regards
Mark

Reply via email to