Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] NativeBufferUtils#memoryMove() doesn't manipulate bytes #22

Open
pavly-gerges opened this issue Feb 2, 2023 · 0 comments
Open
Labels
core Concerning API core code documentation Improvements or additions to documentation
Milestone

Comments

@pavly-gerges
Copy link
Member

NativeBufferUtils#memoryMove(ByteBuffer, ByteBuffer, long) uses the GNU libc void * memmove ( void *to, const void *from, size_t size ) from string.h which according to the documentation:

memmove copies the size bytes at from into the size bytes at to, even if those two blocks
of space overlap. In the case of overlap, memmove is careful to copy the original values
of the bytes in the block at from, including those bytes which also belong to the block
at to.
The value returned by memmove is the value of to.

The workaround is to remove the function memoryMove and internally implement the memmove() for the java side memoryCopy().

@pavly-gerges pavly-gerges added bug Something isn't working core Concerning API core code labels Feb 2, 2023
@pavly-gerges pavly-gerges added this to the API-Core-Code milestone Feb 2, 2023
@pavly-gerges pavly-gerges pinned this issue Feb 2, 2023
@pavly-gerges pavly-gerges unpinned this issue Feb 11, 2023
@pavly-gerges pavly-gerges added documentation Improvements or additions to documentation and removed bug Something isn't working labels Mar 25, 2023
@pavly-gerges pavly-gerges changed the title [Core-Bug] NativeBufferUtils#memoryMove() doesn't manipulate bytes [Docs] NativeBufferUtils#memoryMove() doesn't manipulate bytes Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Concerning API core code documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant