NPE on "return" bytecode of java.net.NetworkInterface

David M. Lloyd david.lloyd at redhat.com
Mon Nov 14 15:54:37 UTC 2016


On 11/14/2016 09:39 AM, Chris Hegarty wrote:
>
> On 14/11/16 15:29, Andrew Haley wrote:
>> On 14/11/16 14:47, David M. Lloyd wrote:
>>
>>> Since this method is called from a native method, is it possible
>>> that somehow the native method is generating an NPE, but the Java
>>> method is still in the stack context?  I assume that what is
>>> happening here is some kind of class init order snafu, but it's
>>> pretty tricky to diagnose exactly with this non-intuitive stack.
>>
>> java.net.NetworkInterface.getAll() will return null if it fails to
>> create an instance of NetworkInterface.  It's quite possible that
>> inlining will make it appear that a NPE at getAll's caller is reported
>> at the return.
>>
>> Try either TieredStopAtLevel=1 or disable compilation for getAll().
>
> Additionally, is it possible to run with '-Xcheck:jni' ?

We'll give it a shot.
-- 
- DML


More information about the core-libs-dev mailing list