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

US061 09.04.4 p10 Coroutine allocation should consider std::align_val_t P2014 #60

Closed
wg21bot opened this issue Oct 23, 2019 · 5 comments
Labels
coroutines Coroutines EWG Evolution rejected No consensus for a change.
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 23, 2019

Coroutine allocation does not consider std::align_val_t overloads introduced in C++17

Proposed change:
Add them to the sequence of operator new calls that are attempted using wording similar to 7.6.2.7/18

@wg21bot wg21bot added the EWG Evolution label Oct 23, 2019
@wg21bot wg21bot changed the title US061 09.04.4 p10 US061 09.04.4 p10 Coroutine allocation should consider std::align_val_t Oct 23, 2019
@wg21bot wg21bot added the coroutines Coroutines label Oct 23, 2019
@jfbastien
Copy link
Collaborator

From #62 (closed as duplicate):

The construction of the argument list for the call to the allocation function to allocate the 'coroutine state' does not call the overload of operator new() that accepts a std::align_val_t in the case that the allocation required for the coroutine has 'new-extended alignment'. This means that allocations of coroutine frames may not be correctly aligned in cases where the coroutine state contains overaligned types.

Proposed change:
Apply similar wording from [expr.new]p18:
Insert
"If the coroutine state has new-extended alignment then the next argument is std::align_val_t." after "has type size_t."

Insert at end of paragraph:
If no matching function is found and the allocated coroutine state has new-extended alignment, the alignment argument is removed from the argument list, and overload resolution is performed again.

@jfbastien
Copy link
Collaborator

EWG Tuesday: http://wiki.edg.com/bin/view/Wg21belfast/US061

US061 Does EWG want to consider this for C++20

F A
7 2

Gor and Lewis to work on wording.

@jfbastien
Copy link
Collaborator

jfbastien commented Jan 18, 2020

See cplusplus/papers#750

@jensmaurer jensmaurer changed the title US061 09.04.4 p10 Coroutine allocation should consider std::align_val_t US061 09.04.4 p10 Coroutine allocation should consider std::align_val_t P2014 Jan 19, 2020
@jfbastien
Copy link
Collaborator

Based on discussion of P2014, no consensus for change.

@jensmaurer
Copy link
Member

EWG in Prague: Rejected. There was no consensus to adopt this change.

@jensmaurer jensmaurer added the rejected No consensus for a change. label Feb 11, 2020
@jensmaurer jensmaurer added this to the CD C++20 milestone Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coroutines Coroutines EWG Evolution rejected No consensus for a change.
Projects
None yet
Development

No branches or pull requests

3 participants