Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[libc++] Remove
get_temporary_buffer
/return_temporary_buffer
#100914[libc++] Remove
get_temporary_buffer
/return_temporary_buffer
#100914Changes from 25 commits
f7ff07e
25a9782
038af58
60212b2
2841f72
d0f6edf
5268aa9
3529007
2a71c0e
6d42fd6
cfc0ef5
3cc9bb7
9e2567a
ffce43a
b83103b
c812180
f6e94f7
5c50d6a
2890c1d
b8de11d
eda4edf
1f3fde7
5e4b157
2bd52cb
51b18a2
0961a50
dc503fa
74f4c4a
1406cd5
de9a474
fa30053
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this breaks CFI builds. It allocates memory with uninitialized objects and casts them to
_Tp*
. I think you're supposed to keep thisvoid*
until you placement-new into it, at which point it becomes an actual object.The old
get_temporary_buffer
had this problem too, but it's marked_LIBCPP_NO_CFI
while this new function isn't. (get_temporary_buffer
on the other hand probably doesn't have to be marked_LIBCPP_NO_CFI
anymore.)A simple fix would be to mark this new function here
_LIBCPP_NO_CFI
.(Maybe the whole design is a bit questionable though? But I mostly care about CFI no longer working.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm now opening a PR to add
_LIBCPP_NO_CFI
to this function. Is there a better way to address this problem?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a
void*
for the uninitialized tail and a_Tp*
for the initialized head, I suppose? Not sure :)Thanks for the quick PR!