Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure mapping of callee is updated with direct mapping
Consider this scenario: - Program increases length of an account - Program start CPI and adds this account as a read-only account - In fn update_callee_account() we resize account, which may change the pointer - Once CPI finishes, the program continues and may read/write from the account. The mapping must be up-to-date else we use stale pointers. Note that we always call callee_account.set_data_length(), which may change the pointer. In testing I found that resizing a vector from 10240 down to 127 sometimes changes its pointer. So, always update the pointer. NEEDS TESTS
- Loading branch information