Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6578707

Typecode Indirection error thrown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 6u1
    • Fix Version/s: None
    • Component/s: other-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL JDK VERSION(S):
      -------------------
      java version "1.6.0_01"
      Java(TM) SE Runtime Environment (build 1.6.0_01-b05)
      Java HotSpot(TM) Client VM (build 1.6.0_01-b05, mixed mode, sharing)

      DESCRIPTION:
      ------------
      I have run the attached test case with IBM SDK as the client and Sun SDK as Server. The testcase runs fine for i=1 to i=322 but fails at i=333. It also fails at i=837 when i is started from 334 in for loop. The logs suggest that the reply message sent by Sun ORB does not send correct indirection offset. The indirection offset (0xFFFFFF80) is not pointing to the correct typecode value (0x0000001D).


      Client.java
      =====================================================================================
      import java.rmi.*;
      import javax.rmi.*;
      import javax.naming.*;
      import java.rmi.server.*;
      import java.io.*;
      import java.util.*;

      class Fragment implements java.io.Serializable {

          String str;

          Fragment(int size) {
              str="";
              for(int i=0;i<size;i++) {
                  str+="B";
              }
          }


      }

      class Wrapper implements java.io.Serializable{

      Fragment f = null;

      Vector vec = null;

      public Wrapper(int len, Vector vec){
      this.vec = vec;
      f = new Fragment(len);

      }

           private void readObject(java.io.ObjectInputStream is) throws java.io.IOException, ClassNotFoundException{
             is.defaultReadObject();
           }

          private void writeObject(java.io.ObjectOutputStream is) throws java.io.IOException{
             is.defaultWriteObject();
           }
      }

      public class Client{

      public static void main(String[] args) throws Exception{
      Context ic = new InitialContext();
      Object ref = ic.lookup("HELLO");
      Hello hello = (Hello)PortableRemoteObject.narrow(ref, Hello.class);
      Throwable t = new Throwable();
      Vector v = new Vector();
      v.add(t);
      for(int i = 0; i < 1024; i++){
      System.out.println(i);
      Wrapper w = new Wrapper(i, v);
      hello.sayHello(w);
      }
      }
      =====================================================================================


      Server.java
      =====================================================================================
      import java.rmi.*;
      import javax.rmi.*;
      import javax.naming.*;
      import java.rmi.server.*;
      public class Server{
      public static void main(String[] args ) throws Exception{
      Hello hello = new HelloImpl();
      Context ic = new InitialContext();
      ic.rebind("HELLO",hello);
      }
      }
      =======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              elarsen Erik Larsen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: