Skip to content

Conversation

@febo
Copy link
Collaborator

@febo febo commented Jul 17, 2025

Problem

The current behaviour of AccountInfo::realloc allowing to skip zero-initialization the memory is deprecated, although realloc still accepts a zero_init parameter. A new resize method was introduced in #174.

Solution

This PR modifies the realloc implementation to use resize, thus ignoring the zero_init parameter and always zero-initializing the data.

@febo febo requested a review from joncinque July 17, 2025 17:38
@febo febo marked this pull request as ready for review July 17, 2025 17:42
Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@febo febo merged commit d84197b into main Jul 17, 2025
10 checks passed
@febo febo deleted the febo/zero-init branch July 17, 2025 19:24
zubayr1 pushed a commit to zubayr1/pinocchio-official that referenced this pull request Jul 17, 2025
author Fernando Otero <[email protected]> 1752707789 +0100
committer zubayr1 <[email protected]> 1752784793 +0200

Clarify the use of constant values (anza-xyz#200)

* Add comments on constants

* Improve offset comments

* Add bitmask to dictionary

* Renamed to field_at_offset

Ignore `zero_init` parameter (anza-xyz#203)

Ignore zero_init parameter

issue 136 idea solution

add checked accounts

fix instruction_data argument for lamports

use Sysvar rent account

update mod

fix typo

issue 136 idea solution

fix instruction_data argument for lamports

update mod

fix typo

implement invoke_signed_checked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants