Skip to content

<functional>: std::function doesn't handle over-aligned types - #698

Merged
Stephan T. Lavavej (StephanTLavavej) merged 28 commits into
microsoft:masterfrom
AlexGuteniev:function_alinged
Apr 22, 2020
Merged

<functional>: std::function doesn't handle over-aligned types#698
Stephan T. Lavavej (StephanTLavavej) merged 28 commits into
microsoft:masterfrom
AlexGuteniev:function_alinged

Conversation

@AlexGuteniev

Copy link
Copy Markdown
Contributor

#690 , starting with tests to make sure they fail

Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
@AlexGuteniev
Alex Guteniev (AlexGuteniev) marked this pull request as ready for review April 9, 2020 05:26
@AlexGuteniev
Alex Guteniev (AlexGuteniev) requested a review from a team as a code owner April 9, 2020 05:26
@miscco

Michael Schellenberger Costa (miscco) commented Apr 9, 2020

Copy link
Copy Markdown
Contributor

Could you please move development offline?

I try to follow the development of the STL and if you push every single commit it really spams my inbox. This PR alone was 6 mails

It would be great if you could finish a task and then push that for review not every step in between.

@AlexGuteniev

Alex Guteniev (AlexGuteniev) commented Apr 9, 2020

Copy link
Copy Markdown
Contributor Author

It would be great if you could finish a task and then push that for review not every step in between.

I'll try, but it is not always possible.

I did make this change locally working, including local test run. Test failure on CI was unexpected, but that's what CI is about - to run more tests under more conditions than I would do locally.

Also I deliberately added tests before the fix to make sure that if tests pass, they really pass, not ignored. This caused extra commit.

@CaseyCarter Casey Carter (CaseyCarter) added the bug Something isn't working label Apr 9, 2020
Comment thread stl/inc/functional Outdated
Comment thread tests/std/test.lst Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/VSO_1062649_overaligned_function/test.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One last static_assert issue here and this looks good to me.

Comment thread tests/std/tests/GH_000690_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/GH_000690_overaligned_function/test.cpp Outdated
Comment thread stl/inc/functional Outdated
Comment thread stl/inc/functional Outdated
Comment thread stl/inc/functional Outdated
Comment thread tests/std/tests/GH_000690_overaligned_function/test.cpp Outdated
Comment thread tests/std/tests/GH_000690_overaligned_function/test.cpp Outdated
Comment thread stl/inc/atomic Outdated
This reverts commit 76bfccb.
It was meant for another branch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! I pushed very small edits to the comments. Now I'll mirror this to the Microsoft-internal repo and merge this soon.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 97f9a2c into microsoft:master Apr 22, 2020
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for this significant bugfix! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<functional>: std::function doesn't handle over-aligned types

5 participants