Skip to content

expose c23 free_sized/free_aligned_sized#832

Merged
mjp41 merged 5 commits intomicrosoft:mainfrom
SchrodingerZhu:c23-free-family
Mar 28, 2026
Merged

expose c23 free_sized/free_aligned_sized#832
mjp41 merged 5 commits intomicrosoft:mainfrom
SchrodingerZhu:c23-free-family

Conversation

@SchrodingerZhu
Copy link
Copy Markdown
Collaborator

@SchrodingerZhu SchrodingerZhu commented Mar 25, 2026

See https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf 7.24.3.4 and 7.24.3.5 for newly added free functions.

A peculiar requirement is that:

  • the result of an malloc, calloc, or realloc call may not be passed to free_aligned_sized
  • the result of an aligned_alloc call may not be passed to free_sized

In SCUDO, this is tracked by attaching tag in alloc metadata. not sure if we want to check this or not.

@SchrodingerZhu
Copy link
Copy Markdown
Collaborator Author

I may have mixed the order of align/size. I will fix that tomorrow.

Copy link
Copy Markdown
Member

@mjp41 mjp41 left a comment

Choose a reason for hiding this comment

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

LGTM

@mjp41
Copy link
Copy Markdown
Member

mjp41 commented Mar 27, 2026

@SchrodingerZhu could you fix the clangformat issue please.

@mjp41
Copy link
Copy Markdown
Member

mjp41 commented Mar 27, 2026

Clangformat is still unhappy

@SchrodingerZhu
Copy link
Copy Markdown
Collaborator Author

@mjp41 I don't have clang-format-15 on my side. Is it possible to generate a patch as before?

@mjp41
Copy link
Copy Markdown
Member

mjp41 commented Mar 27, 2026

If you revert the change from 826 to the yml file then it will do a patch.

We can change to that

  run: | 
     set -eo pipefail 
     make clangformat 
     git diff --exit-code 
   run: make clangformat-check

@mjp41
Copy link
Copy Markdown
Member

mjp41 commented Mar 27, 2026

I think we should change it back to make it easier. ( On my phone, so can't actually do that currently)

@mjp41 mjp41 merged commit 5fbf18f into microsoft:main Mar 28, 2026
192 checks passed
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