tuple: fix crash on hashing tuple with double fields#10098
Merged
locker merged 1 commit intotarantool:masterfrom Jun 7, 2024
Merged
tuple: fix crash on hashing tuple with double fields#10098locker merged 1 commit intotarantool:masterfrom
locker merged 1 commit intotarantool:masterfrom
Conversation
`tuple_hash_field()` doesn't advance the MsgPack cursor after hashing a tuple field with the type `double`, which can result in crashes both in memtx (while inserting a tuple into a hash index) and in vinyl (while writing a bloom filter on dump or compaction). The bug was introduced by commit 51af059 ("box: compare and hash msgpack value of double key field as double"). Closes tarantool#10090 NO_DOC=bug fix
b902622 to
58dd9e8
Compare
mkostoevr
approved these changes
Jun 6, 2024
Contributor
mkostoevr
left a comment
There was a problem hiding this comment.
Very good catch, thanks. LGTM.
BTW I like how it introduces 70 times more tests than changed code.
lenkis
approved these changes
Jun 7, 2024
Member
Author
|
Cherry-picked to 2.11 and 3.1. |
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.
tuple_hash_field()doesn't advance the MsgPack cursor after hashing a tuple field with the typedouble, which can result in crashes both in memtx (while inserting a tuple into a hash index) and in vinyl (while writing a bloom filter on dump or compaction).The bug was introduced by commit 51af059.
Closes #10090