Nov11 / kryo

Automatically exported from code.google.com/p/kryo
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Buffer Allocation Fails when using Integer.MAX_VALUE #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use an ObjectBuffer with a max allocation of Integer.MAX_VALUE
2. Try allocate a very large object
3. On the last increment of trying to double the buffer, the line that has int 
newCapacity = Math.min(maxCapacity, capacity * 2) results in a negative value 
because capacity*2 flips to negative.

What is the expected output? What do you see instead?
It should take maxCapacity over a negative value

What version of the Kryo are you using?
1.03

Please provide any additional information below.

Original issue reported on code.google.com by rbakhru@gmail.com on 6 Mar 2011 at 1:34

GoogleCodeExporter commented 9 years ago
ObjectBuffer is gone in v2.

Original comment by nathan.s...@gmail.com on 17 Apr 2012 at 10:18