[all-commits] [llvm/llvm-project] 9d1880: [libcxx] Remove empty ~__no_destroy
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Fri Apr 26 15:25:50 PDT 2024
Branch: refs/heads/users/vitalybuka/spr/libcxx-avoid-__cxa_atexit-with-o0
Home: https://github.com/llvm/llvm-project
Commit: 9d18805ac5395158a2a80fd2efd5edac46c70d28
https://github.com/llvm/llvm-project/commit/9d18805ac5395158a2a80fd2efd5edac46c70d28
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths:
M libcxx/include/__utility/no_destroy.h
A libcxx/test/libcxx/utilities/no_destroy.pass.cpp
Log Message:
-----------
[libcxx] Remove empty ~__no_destroy
Primary motivation is that after #84651 msan will
complain if fields accessed after ~__no_destroy.
Previously msan assumed that __obj_ will have own
destructor, were we will poison the field, but it never
happened before.
After #84651 msan will complain on any field access
after `~__no_destroy`.
As is Msan does validate fields destruction order for
classes with trivial destructor.
Additionally empty destructor will register __cxa_atexit with -O0.
https://gcc.godbolt.org/z/hce587b65
We can not remove the destructor with union where
_Tp can have non-trivial destructor.
But we can remove destructor if we use in-place
new instead of union.
https://gcc.godbolt.org/z/Yqxx57eEd - empty even with -O0.
Reviewers: #reviewers-libcxx
Pull Request: https://github.com/llvm/llvm-project/pull/89882
Commit: ac1587b0be1bbbeffb2b533c77af74415a89b802
https://github.com/llvm/llvm-project/commit/ac1587b0be1bbbeffb2b533c77af74415a89b802
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths:
M libcxx/include/__utility/no_destroy.h
Log Message:
-----------
Remove "unsigned"
Commit: 15239a6aea6d71440d30e59ac7123d8241f5a993
https://github.com/llvm/llvm-project/commit/15239a6aea6d71440d30e59ac7123d8241f5a993
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths:
M libcxx/include/__utility/no_destroy.h
M libcxx/test/libcxx/utilities/no_destroy.pass.cpp
Log Message:
-----------
Move field initialized and add constinit test
Commit: acd61a447b73e1a20c63628ac7d0c66e3b734e06
https://github.com/llvm/llvm-project/commit/acd61a447b73e1a20c63628ac7d0c66e3b734e06
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths:
M libcxx/test/libcxx/utilities/no_destroy.pass.cpp
Log Message:
-----------
Inline test
Commit: 5487aaffa8c975747aaf705664be30351b12736c
https://github.com/llvm/llvm-project/commit/5487aaffa8c975747aaf705664be30351b12736c
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths:
M libcxx/test/libcxx/utilities/no_destroy.pass.cpp
Log Message:
-----------
reorder test
Compare: https://github.com/llvm/llvm-project/compare/bd0af57f1ae6...5487aaffa8c9
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list