Closed knutsr closed 2 years ago
Fixed in 8.6.2.1. Thanks!
Great! Thank you.
@jefffhaynes Unless I'm doing something stupid, it still fails in 8.6.2.1.
In the same place?
I cloned the repo and added the attached project file and code to the solution. The test you added runs fine, but the test program does not.
Sorry, it was me doing something stupid :)
Try 8.6.2.2
All is good now. Thanks a lot for fixing this :+1:
Hi,
We ran into an issue using
FieldBitLength
. We have defined a class with some byte-wise fields and some bit-wise fields. Trying to deserialize an array of such class instance will fail if the input array size is not an exact multiple of the size of a single instance. TheDeserialize
call never returns and consumes all available memory.Trying to deserialize by calling
ser.Deserialize<BitFieldsAlone>(serialized);
with this definition succeeds with any input array length:Trying to deserialize by calling
ser.Deserialize<BitFieldsPrecededByByte[]>(serialized);
with this definition fails with input array lengths that are not multiples of 2:See attached project file and code to reproduce.
BinarySerializationMemoryIssue.csproj.txt Program.cs.txt