Skip to content
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

v2.2: If the account length is zero, no data region is present (backport of #5122) #5136

Open
wants to merge 1 commit into
base: v2.2
Choose a base branch
from

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Mar 4, 2025

This only affects unaligned programs, as for aligned programs the resize area address will match the account region address if the data length is zero.

Problem

When an account is length zero, then there is no account data region. Memcpy's across the data should be permitted since there is no data region.

Found by @topointon-jump

Summary of Changes

Fixes #


This is an automatic backport of pull request #5122 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner March 4, 2025 08:40
Copy link
Author

mergify bot commented Mar 4, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

This only affects unaligned programs, as for aligned programs the resize
area address will match the account region address if the data length is
zero.

(cherry picked from commit 561023d)
@seanyoung seanyoung force-pushed the mergify/bp/v2.2/pr-5122 branch from c298965 to 475324f Compare March 4, 2025 10:38
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.

1 participant