-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Extend #7956 with one more test. #7992
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
Merged
Merged
Conversation
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
I made a silly mistake in a database wrapper where keys were sorted by char instead of uint8_t. As x86 char is signed the sorting for the block index database was messed up, resulting in a segfault due to missing records. Add a test to catch: - Wrong sorting - Seeking errors - Iteration result not complete
Thanks! |
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) { | ||
if (ser_action.ForRead()) { | ||
str.clear(); | ||
char c; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please initialize this (as clang
said 8):
char c = '\0';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Concept ACK |
@TheBlueMatt Can you address 7be4754#r61928804 ? |
7be4754
to
269a440
Compare
maflcko
pushed a commit
to maflcko/bitcoin-core
that referenced
this pull request
Jun 9, 2016
Github-Pull: bitcoin#7992 Rebased-From: 84c13e7 6030625 269a440
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Apr 4, 2018
Additional dbwrapper tests Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#7992 - bitcoin/bitcoin#9867 - Only the commit affecting dbwrapper tests - bitcoin/bitcoin#9610 - Only the change affecting dbwrapper tests - bitcoin/bitcoin#10844
random-zebra
added a commit
to PIVX-Project/PIVX
that referenced
this pull request
Apr 23, 2021
bc3d3fa Add testcase to simulate bitcoin schema in leveldb (MapleLaker) 4f15155 Verify DBWrapper iterators are taking snapshots (Matt Corallo) 36b407e test: Replace remaining sprintf with snprintf (Wladimir J. van der Laan) e8cb38a Add test for dbwrapper iterators with same-prefix keys. (Matt Corallo) 4a4ddb8 test: Add more thorough test for dbwrapper iterators I made a silly mistake in a database wrapper where keys were sorted by char instead of uint8_t. As x86 char is signed the sorting for the block index database was messed up, resulting in a segfault due to missing records. (Wladimir J. van der Laan) 109446f chain: Add assertion in case of missing records in index db (Wladimir J. van der Laan) Pull request description: Back ported the following PRs from upstream (adaptations were needed because we aren't obfuscating the db): * bitcoin#7992. * bitcoin#9867. * bitcoin#11422. * bitcoin#17206 ACKs for top commit: random-zebra: Nice! ACK bc3d3fa Tree-SHA512: ebd811d7ee0d970247ceec2624e524df7611274f36ef7c0252712ebf247828ee091dcc6872585271fac3d7846127a997a856d7cd72eb20425e06213207ff1c7a
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.