RuedigerMoeller / fast-serialization

FST: fast java serialization drop in-replacement
Apache License 2.0
1.59k stars 247 forks source link

ArrayIndexOutOfBoundsException by using writeObject() calls many times (> Integer.MAX_VALUE+1) #179

Closed MrCodeGenEric closed 7 years ago

MrCodeGenEric commented 7 years ago

If we call the method writeObject() of FSTObjectOutput many times ( > Integer.MAX_VALUE+1), then we get the follow exception

Caused by: java.lang.ArrayIndexOutOfBoundsException: -2147483648 at org.nustaq.serialization.FSTObjectOutput.getCachedFI(FSTObjectOutput.java:294) at org.nustaq.serialization.FSTObjectOutput.writeObjectInternal(FSTObjectOutput.java:317) at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:284) at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:193)

The Methode writeObject() increment "curDepth" without decrement "curDepth". It seems to be a bug.

RuedigerMoeller commented 7 years ago

seems you ar right ..

RuedigerMoeller commented 7 years ago

fixed with 2.49

fireflyhoo commented 6 years ago

天啦噜个fuck!!!