Skip to content

Fix corruption when using HeapBytez#318

Open
subes wants to merge 1 commit intoRuedigerMoeller:masterfrom
subes:master
Open

Fix corruption when using HeapBytez#318
subes wants to merge 1 commit intoRuedigerMoeller:masterfrom
subes:master

Conversation

@subes
Copy link
Copy Markdown
Contributor

@subes subes commented Sep 14, 2021

encountered a corruption issue when using zero copy using HeapCoder which internally uses HeapBytez. The error occurs frequently when using unwrapped Netty-Pooled-Buffers because they use a very long byte[] array and extract slices from it for pooled ByteBuf instances. When giving those to FST we have to be careful to not use the "off" which is likely to be in the thousands to be applied to the source which should have a 0 index (+byteoff) instead. Please also backport to 2.x branch for Java 8 support!

encountered a corruption issue when using zero copy using HeapCoder which internally uses HeapBytez. The error occurs frequently when using unwrapped Netty-Pooled-Buffers because they use a very long byte[] array and extract slices from it for pooled ByteBuf instances. When giving those to FST we have to be careful to not use the "off" which is likely to be in the thousands to be applied to the source which should have a 0 index (+byteoff) instead. Please also backport to 2.x branch for Java 8 support!
@subes
Copy link
Copy Markdown
Contributor Author

subes commented Sep 14, 2021

Here is also a backport to java 8 for this: https://github.com/subes/fast-serialization/tree/java8backport
I used the commit before the java 14 changes to base this off for a 2.58 (you need to adjust the version number before release). Sadly there was no 2.57 tag so dunno if I got the correct commit for the backport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant