Update kpl/tpc key extraction to return -1 if unwrap fails #416
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.
Closes #415
Summary
When running the fuzz test for tpcitem_extract_key, a failure was encountered quickly where the call used to get the key value is being used on a non-i32 value, which leads to a crash.
Architectural Changes
No change
New Features
No change
Improvements
No change
Bug Fixes
Return a
-1
if the TPC Item key extraction cannot unwrap the value.Testing and validation
Issue was uncovered with minimal run time during fuzz tests. This time, the
tpcitem_extract_key
test was run for 10 minutes to ensure no additional failures need to be addressed. Note, the previous failures were found within 10 seconds of fuzz testing.Command is
cargo fuzz run tpcitem_extract_key -- -max_total_time=600
Documentation
This PR does not primarily deal with documentation changes.