RFC: Untested Win32 InetAddress tweak

Marco Trudel mtrudel@gmx.ch
Mon Oct 2 07:19:00 GMT 2006


Mohan Embar wrote:
> Hi All,
> 
>>> The last part of java.net.InetAddress.lookup (a native method) is the
>>> same in both Posix and Win32 variants except for a security check that
>>> was removed from the Posix variant in August 2004.  The attached patch
>>> removes this check from the Win32, synchronising the two.
>>>
>>> I don't have the ability to test this, so could someone try it for me?
>>> Alternatively, is this a trivial enough change to just commit blind?
>> Something must have went wrong. java/net/InetAddress.java was changed 
>> according this patch, java/net/natInetAddressWin32.cc has not. This 
>> leads to an error on compilation. Please commit the rest as well...
>>
>> Here's the link to the trunk head, you can see that the code is still there:
>> http://gcc.gnu.org/viewcvs/trunk/libjava/java/net/natInetAddressWin32.cc?view=markup
> 
> I agree with Marco. Although I understand that Gary probably can't
> commit the rest without approval,

There seems to be some misunderstanding. I'm talking about this patch: 
http://gcc.gnu.org/ml/java-patches/2006-q3/txt00034.txt
Tom gave his ok to commit that, but it seems only parts of it made it 
into the trunk. So I assume it would be ok to commit the rest as well...
But actually that wouldn't help much. With the rest of that patch, GCJ 
would compile again for win32, but InetAddress throws an Exception at 
runtime:

SocketAddress sock = new SocketAddress(12345); throws a 
NullPointerException in natInetAddressWin32.cc at
    JvSynchronize sync (java::net::InetAddress::loopbackAddress);

I think this has been fixed in the latest patches to this topics. But 
these are not committed and break compilation again.


 > I can also confirm that current SVN HEAD breaks for
 > Win32 without Gary's patch + my minor address-of corrections.

I think you're talking about the second last patch 
(http://gcc.gnu.org/ml/java-patches/2006-q3/msg00448.html) that hasn't 
been committed yet. Gary updated that after your feedback:
http://gcc.gnu.org/ml/java-patches/2006-q3/msg00486.html

Gary, does this latest patch include all changes that are not yet in 
trunk? If not, can you please post an updated patch that includes 
everything even the missing parts of old patches? I'd like to test the 
win32 part.
If yes, it breaks at least the compilation of a linux to windows 
cross-GCJ starting with "Class InetAddress not found" and develops into 
java.lang.Object not found.


Can we either roll the complete InetAddress tweak back or get the rest 
fixed and committed as well?


Marco



More information about the Java-patches mailing list