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

Check size is correct if specified #520

Merged
merged 2 commits into from
May 12, 2022
Merged

Conversation

mjp41
Copy link
Member

@mjp41 mjp41 commented May 10, 2022

Some secure allocators check that the C++ supplied size is correct
relative to the meta-data. This adds a check to the secure version of
snmalloc to do that.

@mjp41 mjp41 force-pushed the check_size_on_free branch from 013bbc0 to 95cdcad Compare May 10, 2022 10:35
mjp41 added 2 commits May 10, 2022 11:58
Make the check_client macro use the new "pretty" format.
Some secure allocators check that the C++ supplied size is correct
relative to the meta-data. This adds a check to the secure version of
snmalloc to do that.
@mjp41 mjp41 force-pushed the check_size_on_free branch from 95cdcad to aa4d9ad Compare May 10, 2022 10:59
@mjp41 mjp41 requested a review from nwf May 10, 2022 14:25
Copy link
Collaborator

@nwf nwf left a comment

Choose a reason for hiding this comment

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

LGTM; perhaps in the fullness of time we should have dealloc_cheri_checks also call check_size (there's a TODO therein about possibly enforcing this policy, too).

@mjp41 mjp41 merged commit 888d182 into microsoft:main May 12, 2022
@mjp41 mjp41 deleted the check_size_on_free branch May 12, 2022 09:12
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.

2 participants