Skip to content

Comments

hash: Upgrade xxHash to 0.8.3#21254

Open
weltling wants to merge 3 commits intophp:masterfrom
weltling:xxhash-0.8.3
Open

hash: Upgrade xxHash to 0.8.3#21254
weltling wants to merge 3 commits intophp:masterfrom
weltling:xxhash-0.8.3

Conversation

@weltling
Copy link

Updates the bundled xxHash library to 0.8.3 and adapts the renamed struct members.

Signed-off-by: Anatol Belski <ab@php.net>
The xxHash 0.8.3 upgrade renamed the `memsize` member to `bufferedSize`
in XXH32_state_s and XXH64_state_s.

Signed-off-by: Anatol Belski <ab@php.net>
@TimWolla
Copy link
Member

For reference: #20064 (comment)

Signed-off-by: Anatol Belski <ab@php.net>
@weltling
Copy link
Author

For reference: #20064 (comment)

Thanks for the heads up! I looked into the serialization concern from #20064.

The struct changes in 0.8.3 are renames and type reinterpretations only - the binary layout is identical. XXH3_state_s is unchanged entirely. The serialization works on byte offsets, not field names, so it roundtrips correctly across 0.8.3 and older versions.

Added a backward compat test that can be executed on earlier versions and to ensure future compatibility.

Thanks

Copy link
Member

@ndossche ndossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did the following checks:

  • Ran with ASAN/UBSAN
  • Checked the test
  • Checked code changes in ext/hash
  • Checked the diff against upstream xxhash 0.8.3, clean diff.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants