Conversation
…gned()` (#9142) * Adds INVOKE_REALLOC_SHRINK_THEN_CPI_THEN_REALLOC_EXTEND to test_program_sbf_realloc_invoke(). * Zero the slice between post_len and the current account len when stricter_abi_and_runtime_constraints && !account_data_direct_mapping in deserialize_parameters_aligned(). * Revert "Zero the slice between post_len and the current account len when stricter_abi_and_runtime_constraints && !account_data_direct_mapping in deserialize_parameters_aligned()." This reverts commit 3045db332cd1de077f058c66e2a137ac7afc150d. * Zero the slice between prev_len and post_len in update_callee_account() when stricter_abi_and_runtime_constraints && !account_data_direct_mapping. * Rekeys stricter_abi_and_runtime_constraints and account_data_direct_mapping. (cherry picked from commit 5785317)
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v3.1 #9248 +/- ##
=========================================
- Coverage 83.2% 83.2% -0.1%
=========================================
Files 865 865
Lines 375511 375567 +56
=========================================
+ Hits 312592 312637 +45
- Misses 62919 62930 +11 🚀 New features to boost your workflow:
|
LucasSte
approved these changes
Nov 24, 2025
t-nelson
approved these changes
Nov 24, 2025
buffalojoec
approved these changes
Nov 25, 2025
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.
Problem
Currently the behavior of
stricter_abi_and_runtime_constraints && !account_data_direct_mappingmatches that of!stricter_abi_and_runtime_constraints, but should instead match that ofstricter_abi_and_runtime_constraints && account_data_direct_mappingin the following case:When a program shrinks an account before CPI and then restores to the original length before returning, then the slice between the actual account length and the final size which the caller requested should be zeroed out, but isn't.
Summary of Changes
Changes
deserialize_parameters_aligned(), so thatstricter_abi_and_runtime_constraints && !account_data_direct_mappingmatchesstricter_abi_and_runtime_constraints && account_data_direct_mappingandaccount_data_direct_mappingbecomes an invisible change again.Feature gate: https://github.com/anza-xyz/feature-gate-tracker/issues/16
This is an automatic backport of pull request #9142 done by Mergify.