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

Make heap small chunk size setting logic more precise/correct #4527

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

dipinhora
Copy link
Contributor

Prior to this commit, the heap small chunk size setting logic would bitwise-or in the size into the appropriate bits of the small chunk but this is technically incorrect as it doesn't clear out the bits first.

This commit changes the logic to ensure the relevant bits are cleared first before the new size is bitwise-or'd in.

Prior to this commit, the heap small chunk size setting logic would
bitwise-or in the size into the appropriate bits of the small chunk
but this is technically incorrect as it doesn't clear out the bits
first.

This commit changes the logic to ensure the relevant bits are cleared
first before the new size is bitwise-or'd in.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Oct 9, 2024
@SeanTAllen
Copy link
Member

@dipinhora I believe this would count as a bug fix, yes? And I think, should get a changelog entry and release notes. Do you agree?

@dipinhora
Copy link
Contributor Author

@dipinhora I believe this would count as a bug fix, yes? And I think, should get a changelog entry and release notes. Do you agree?

@SeanTAllen probably, yes.. in the current implementation the size is only ever set once on a newly allocated small_chunk_t which i believe wouldn't be an issue unless the pool is recycling previously used memory that has those bits already set (unsure how likely that is or if it has already caused issues in the wild)..

@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Oct 11, 2024
@ponylang-main
Copy link
Contributor

Hi @dipinhora,

The changelog - fixed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.

Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 4527.md to match the number of this pull request.

The basic format of the release notes (using markdown) should be:

## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.

@dipinhora
Copy link
Contributor Author

release notes added.. feel free to tweak them as needed (or let me know what needs tweaking)..

@SeanTAllen SeanTAllen merged commit b7de24b into ponylang:main Oct 15, 2024
20 checks passed
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Oct 15, 2024
github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants