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: decayed_counter can overflow if shifted more than 63 #35054

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Feb 2, 2024

Problem

https://github.com/solana-labs/solana/pull/34391/files#r1476263596

Summary of Changes

Shifting the value for more than 63 times can cause an overflow. Add a limit, and a unit test.

Fixes #

@pgarg66 pgarg66 marked this pull request as ready for review February 2, 2024 16:47
@pgarg66 pgarg66 added the v1.18 PRs that should be backported to v1.18 label Feb 2, 2024
Copy link
Contributor

mergify bot commented Feb 2, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

@pgarg66 pgarg66 merged commit bf95f65 into solana-labs:master Feb 2, 2024
36 checks passed
@pgarg66 pgarg66 deleted the decayed-counter branch February 2, 2024 18:10
mergify bot pushed a commit that referenced this pull request Feb 2, 2024
pgarg66 added a commit that referenced this pull request Feb 2, 2024
…kport of #35054) (#35057)

Fix: decayed_counter can overflow if shifted more than 63 (#35054)

(cherry picked from commit bf95f65)

Co-authored-by: Pankaj Garg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.18 PRs that should be backported to v1.18
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants