Skip to content

Conversation

@zibi2
Copy link
Contributor

@zibi2 zibi2 commented Sep 23, 2024

This PR fixes the following lit which was recently updated in PR 76756:

FAIL: ibm-zos-libc++-shared.cfg.in :: libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
Here are some compilation errors

# | llvm-project/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp:76:8: error: aligned deallocation function of type 'void (void *, enum std::align_val_t) noexcept' is not available on z/OS
# |    76 | struct OldEmplaceControlBlock : std::__shared_weak_count {
# |       |        ^
# | llvm-project/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp:103:7: note: in implicit destructor for 'OldEmplaceControlBlock<OveralignedEmptyType, TrivialEmptyAlloc<OveralignedEmptyType>>' first required here
# |   103 |   Old old(a);
# |       |       ^
# | llvm-project/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp:200:3: note: in instantiation of function template specialization 'test<OveralignedEmptyType, TrivialEmptyAlloc>' requested here
# |   198 |   test<OveralignedEmptyType, TrivialEmptyAlloc>();
# |       |   ^
# |llvm-project/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp:76:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
# |    76 | struct OldEmplaceControlBlock : std::__shared_weak_count {
# |       |        ^

@zibi2 zibi2 requested review from muiez and philnik777 September 23, 2024 17:36
@zibi2 zibi2 self-assigned this Sep 23, 2024
@zibi2 zibi2 requested a review from a team as a code owner September 23, 2024 17:36
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Sep 23, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 23, 2024

@llvm/pr-subscribers-libcxx

Author: Zibi Sarbinowski (zibi2)

Changes

This PR fixes the following lit which was recently updated in PR 76756:

FAIL: ibm-zos-libc++-shared.cfg.in :: libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
Here are some compilation errors

# | llvm-project/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp:76:8: error: aligned deallocation function of type 'void (void *, enum std::align_val_t) noexcept' is not available on z/OS
# |    76 | struct OldEmplaceControlBlock : std::__shared_weak_count {
# |       |        ^
# | llvm-project/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp:103:7: note: in implicit destructor for 'OldEmplaceControlBlock&lt;OveralignedEmptyType, TrivialEmptyAlloc&lt;OveralignedEmptyType&gt;&gt;' first required here
# |   103 |   Old old(a);
# |       |       ^
# | llvm-project/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp:200:3: note: in instantiation of function template specialization 'test&lt;OveralignedEmptyType, TrivialEmptyAlloc&gt;' requested here
# |   198 |   test&lt;OveralignedEmptyType, TrivialEmptyAlloc&gt;();
# |       |   ^
# |llvm-project/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp:76:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
# |    76 | struct OldEmplaceControlBlock : std::__shared_weak_count {
# |       |        ^

Full diff: https://github.com/llvm/llvm-project/pull/109693.diff

1 Files Affected:

  • (modified) libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp (+2)
diff --git a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
index a298f55ea7cf5c..7acdbdc2b45517 100644
--- a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
+++ b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
@@ -195,10 +195,12 @@ int main(int, char**) {
   test<TrivialEmptyType, FinalEmptyAlloc>();
   test<TrivialEmptyType, NonTrivialAlloc>();
 
+#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
   test<OveralignedEmptyType, TrivialEmptyAlloc>();
   test<OveralignedEmptyType, TrivialNonEmptyAlloc>();
   test<OveralignedEmptyType, FinalEmptyAlloc>();
   test<OveralignedEmptyType, NonTrivialAlloc>();
+#endif
 
   test<TrivialNonEmptyType, TrivialEmptyAlloc>();
   test<TrivialNonEmptyType, TrivialNonEmptyAlloc>();

@zibi2 zibi2 requested a review from Zingam September 24, 2024 18:36
@zibi2
Copy link
Contributor Author

zibi2 commented Sep 25, 2024

The CI failures are already reported in #99819.

@ldionne
Copy link
Member

ldionne commented Sep 25, 2024

Please rebase onto main to re-trigger CI. The CI instability should be resolved now.

@zibi2 zibi2 force-pushed the zs_libcxx.control_block_layout.pass.cpp branch from 19c52a6 to 2dc94f9 Compare September 25, 2024 17:33
@ldionne ldionne merged commit 60b604a into llvm:main Oct 1, 2024
Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Oct 3, 2024
…ion is not available (llvm#109693)

This PR fixes the shared_ptr control block layout test that was recently updated in llvm#76756.
When aligned allocation/deallocation is not available, part of the test doesn't work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants