-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
lib/gis: Update lz4 library to latest upstream version (v1.10.0) #4666
Conversation
Please check first if the issue is resolved in upstream https://github.com/lz4/lz4 |
@metzm : Thanks for pointing it out. I didn't realize that it was an external library and believed we were maintaining a local version. I have checked the code in the upstream and indeed they have fixed this issue! I can update this PR to have changes which sync our version to the upstream. |
This has fixes simplifying and making the library robust in multiple areas. This also fixes the initial null pointer arithmetic error found by cppcheck, which prompted syncing with the upstream library for new fixes and updates. Signed-off-by: Mohan Yelugoti <[email protected]>
Some testing done as part of the library update:
Only changes come in the form of clang format check specific changes to the upstream code. @metzm : Let me know if I have missed anything or can improve patch set in some way. Thanks! |
@metzm or any one with knowledge: Do we have test that limits the risk of regression of this? |
How about borrowing a test from https://github.com/lz4/lz4/tree/dev/tests/? |
Some things I want to highlight:
|
If I'm not mistaken, that was the time before CI run tests and I'm still not sure whether we have tests for the different supported compression methods. It may have been tested manually by committer with the former updates.
In practice we can, see r.compress for setting and using different compression methods.
All being said, my hunch is that it is probably safe too. @metzm what is your opinion on this? |
I agree that using r.compress to test different compression methods should be sufficient. The LZ4 API is very similar, often identical to the APIs of the other compression methods used in GRASS. I am not expecting any changes here in the default functions as used by us because the have been established for many years in different projects. We are having a local copy because the code base is so small and consists of only two files. Therefore I decided back then to simply add these two files to |
Sync lz4 library with the upstream version v 1.10.0.
This has fixes simplifying and making the library robust in multiple areas.
This also fixes the initial null pointer arithmetic error found by cppcheck, which prompted syncing with the upstream library for new fixes and updates.