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

Fix Jumps to pc greater than i16 #34

Merged
merged 2 commits into from
Aug 15, 2019
Merged

Fix Jumps to pc greater than i16 #34

merged 2 commits into from
Aug 15, 2019

Conversation

jackcmay
Copy link
Collaborator

Original VM implementation casts the pc calculation to i16 for jump instructions. This meant that a jump to a pc larger then max i16 would result in a crash of the vm.

Cast up to isize before doing calculation. isize is much larger than the maximum allowed program size.

This fixes issue: solana-labs/solana#5520 (comment)

@jackcmay jackcmay merged commit 773bff1 into solana-master Aug 15, 2019
@jackcmay jackcmay deleted the crash branch August 15, 2019 05:06
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