Drop support for github.com/DataDog/zstd_0 - #505
Draft
jszwedko wants to merge 2 commits into
Draft
Conversation
zstd_0 is abandoned and has known memory safety vulnerabilities. The MessageEncodingZstdPB wire encoding (value 2) is now treated as unsupported on both encode and decode, matching the behavior already used for the no-cgo build. zstd 1.x (MessageEncodingZstd1xPB) and the klauspost pure-Go implementation remain fully supported and should have strictly better performance anyway. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This is a breaking change: encoding 2 (formerly MessageEncodingZstdPB, backed by zstd_0) is now rejected as an unknown encoding on both encode and decode, instead of exposing a removed-but-still-referenceable constant. Callers still on this encoding must migrate to MessageEncodingZstd1xPB or MessageEncodingZstdPBxNoCgo. Given the breaking nature, this should ship as a v6 major version bump once reviewed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
zstd_0module is abandoned upstream and carries known memory safety vulnerabilities, so this removes it as a dependency along with theMessageEncodingZstdPBwire encoding it backed. Encoding value 2 is now rejected as an unknown encoding on both encode and decode, rather than being kept around as a dead-but-callable constant;zstd1.x and the pure-Goklauspost/compress/zstdpath remain fully supported and should offer strictly better performance in its place.This is a breaking API change (removes the exported
MessageEncodingZstdPBconstant and changes behavior for encoding value 2). Once this is reviewed and approved, we'll bump the module tov6before merging/releasing.Test plan