Is serialization broken?

Bryce McKinlay bryce@albatross.co.nz
Fri Jan 26 16:52:00 GMT 2001


Warren Levy wrote:
> On 2001年1月26日, Barnet Wagman wrote:
>> > I'm getting an erroneous ClassCastException deserializing an object with
> > gcj, gcc version 2.97 20010117 (experimental).
> >
> > With the test program SerTest.java (below)...
>> Well, it seems that java.io.DataInputStream.readInt is throwing an
> EOFException because it is mistakenly reading some negative data to mean
> EOF. I was able to jump past the check for the negative value in the
> debugger and the program ran to completion just fine.

Ouch. Now that I look at this, my DataInputStream patch from classpath should
go in. It will re-merge the implementations and ought to fix this bug.
> Breakpoint 2, java.util.HashMap.readObject (this=@8101fc8, s=@8086400)
> at /home/warrenl/egcs/libjava/java/util/HashMap.java:639
> 639 s.defaultReadObject();

Hmm... do you have a magic GDB that can demange new-ABI java symbols? I'm
using the latest gdb from cvs, which seems to work quite nicely, but it
doesn't demangle. I was planning to make an attempt to fix this, but don't
want to duplicate someone elses effort.
regards
 [ bryce ]


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /