JDK-4066222 : pass wrong parameter to gethostbyaddr_r() in java_net_InetAddressImpl_getLocalHo
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.1.3
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1997-07-22
  • Updated: 2012-11-02
  • Resolved: 1997-09-12
Related Reports
Duplicate :  
Description

Name: rlT66838			Date: 07/21/97


1. try hello world example in RMI

2. why: hp = gethostbyaddr_r(hp->h_addr,
   hp->h_length, AF_INET,&res, buf, sizeof(buf),
   &h_error)return localhost but not actual host
   name.

3. err msg: HelloImpl err: Server RemoteException;
   nested exception is:java.rmi.AccessException: 
   Registry.rebind mozart.insight.att.com/135.205
   .206.201 != localhost/127.0.0.1



======================================================================

Comments
WORK AROUND Name: rlT66838 Date: 07/21/97 struct in_addr in; (void) memcpy(&in.s_addr, *(hp->h_addr_list), sizeof (in.s_addr)); replace "hp->h_addr" in gethostbyaddr_r with "(char *)&in" ======================================================================
11-06-2004

EVALUATION I've sent some mail to the submitter since I've been unable to reproduce it and the bug does contain enough information to evaluate the workaround. tom.rodriguez@Eng 1997-08-11 I exchanged email with the submitter and the his /etc/nsswitch.conf was setup to use files as well. I had a conversation with bejamin about the bug this is a duplicate of, and he though that it only showed up on 2.4. I confirmed that it will show up on 2.5.1 but the name server caching daemon will mask it for simple tests. You need to flush the cache to see it happen. The sysinfo fix will work for this as well. tom.rodriguez@Eng 1997-09-12
12-09-1997