This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/17035] New: gnu.java.rmi should not reuse ObjectInputStreams and ObjectOutputStreams between RMI calls


gnu.java.rmi tries to reuse ObjectOutputStreams between remote method
invocations, which means that second and subsequent invocations in a connection
don't start with the necessary Java serialization magic, 0xaced.

This can be clearly seen in pcap.txt in the attached test case, which is a
hexdump of packets captured by ethereal. The first invocation starts

50 ac ed 00 05 77 22 00 00

which is correct (note the magic "ac ed" indicating the start of a serialization
stream). However, the second invocation is still using the same
ObjectOutputStream, so it starts with:

50 77 22 00 00

which is _not_ correct, and hence the Sun VM complains. (However, because of a
similar bug with incorrectly reusing the _input_ stream, gij is unable to
decipher the error from the Sun VM and thinks the stream is corrupted.)

-- 
           Summary: gnu.java.rmi should not reuse ObjectInputStreams and
                    ObjectOutputStreams between RMI calls
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: greenrd at greenrd dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17035


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]