Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313778

Summary: TCF Discovery fails with array accesses
Product: [Tools] TCF Reporter: Daniel Friederich <danielfriederich>
Component: CoreAssignee: Project Inbox <dsdp.tm.tcf-inbox>
Status: CLOSED DUPLICATE QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, eugene
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Limiting the network prefix to length of address. mober.at+eclipse: iplog-

Description Daniel Friederich CLA 2010-05-20 13:18:11 EDT
Build Identifier: HEAD

On my machine, the TCF discovery in eclipse does not work, it reports
"Invalid datagram packet received" in the log file. However the actual cause is that while detecting network subnets, the java 1.6 API is reporting for InetAddress.getNetworkPrefixLength() a network prefix length of 128, but that network is still using IPV4 addresses.
Therefore the code trying to match addresses tests the first 128 bits of a 32 bit address, causing a ArrayIndexOutOfBoundsException and finally the log entry.

Reproducible: Always

Steps to Reproduce:
Happens for me every time, however as it is caused by the network setup on my machine, it might not be reproducible elsewhere.

On my machine, I get the following subnets:
[127.0.0.1/8, 10.82.136.36/128]
Obviously, the second one is the problematic one as it is using a Ipv4 address with 128 a bit prefix.
Comment 1 Daniel Friederich CLA 2010-05-20 13:26:21 EDT
Created attachment 169382 [details]
Limiting the network prefix to length of address.

The real value on my network is 22 actually (subnet mask shown with ipconfig is 255.255.252.0)
Comment 2 Eugene Tarassov CLA 2010-05-20 13:35:13 EDT
This is duplicate of 312457.
It is actually a bug in Java VM.
Similar workaround is already committed.

Thanks

*** This bug has been marked as a duplicate of bug 312457 ***
Comment 3 Daniel Friederich CLA 2010-05-20 21:09:38 EDT
Thanks Eugene,
not sure why I did not see the other bug. I did update yesterday, apparently before the fix was committed.

The fix for bug 312457 does fix the issue for me :-).
Comment 4 Martin Oberhuber CLA 2010-09-21 08:55:27 EDT
Comment on attachment 169382 [details]
Limiting the network prefix to length of address.

Marking patch obsolete since it was not used.
Comment 5 Doug Schaefer CLA 2011-05-17 10:51:01 EDT
Moving bugs to new home for IP log.