Skip to content

Conversation

frederick-vs-ja
Copy link
Contributor

Currently, libcxx\test\libcxx\containers\associative\unord.map\abi.compile.pass.cpp consistently fails for 32-bit platforms.

There's an off-by-4 size calculation error for some unordered_map specializations, possibly due to mistakenly ignoring some data member.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner September 5, 2025 03:28
@frederick-vs-ja frederick-vs-ja added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. test-suite labels Sep 5, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 5, 2025

@llvm/pr-subscribers-libcxx

Author: A. Jiang (frederick-vs-ja)

Changes

Currently, libcxx\test\libcxx\containers\associative\unord.map\abi.compile.pass.cpp consistently fails for 32-bit platforms.

There's an off-by-4 size calculation error for some unordered_map specializations, possibly due to mistakenly ignoring some data member.


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

1 Files Affected:

  • (modified) libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp (+3-3)
diff --git a/libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp b/libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp
index 39fc9fe94a83c..a9fafe0452ac3 100644
--- a/libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp
@@ -209,9 +209,9 @@ static_assert(TEST_ALIGNOF(unordered_map_alloc<char, final_small_iter_allocator<
               "");
 
 static_assert(sizeof(std::unordered_map<int, int, FinalHash, UnalignedEqualTo>) == 24, "");
-static_assert(sizeof(std::unordered_map<int, int, FinalHash, FinalEqualTo>) == 24, "");
-static_assert(sizeof(std::unordered_map<int, int, NonEmptyHash, FinalEqualTo>) == 28, "");
-static_assert(sizeof(std::unordered_map<int, int, NonEmptyHash, NonEmptyEqualTo>) == 32, "");
+static_assert(sizeof(std::unordered_map<int, int, FinalHash, FinalEqualTo>) == 28, "");
+static_assert(sizeof(std::unordered_map<int, int, NonEmptyHash, FinalEqualTo>) == 32, "");
+static_assert(sizeof(std::unordered_map<int, int, NonEmptyHash, NonEmptyEqualTo>) == 36, "");
 
 static_assert(TEST_ALIGNOF(std::unordered_map<int, int, FinalHash, UnalignedEqualTo>) == 4, "");
 static_assert(TEST_ALIGNOF(std::unordered_map<int, int, FinalHash, FinalEqualTo>) == 4, "");

@frederick-vs-ja

This comment was marked as resolved.

Currently,
`libcxx\test\libcxx\containers\associative\unord.map\abi.compile.pass.cpp`
consistently fails for 32-bit platforms. There's an off-by-4 size
calculation error for some `unordered_map` specializations, possibly due
to mistakenly ignoring some data member.
@frederick-vs-ja frederick-vs-ja force-pushed the libcxx-test-abi-umap-size branch from 31594cb to a7c90dc Compare September 5, 2025 05:51
Copy link
Contributor

@philnik777 philnik777 left a comment

Choose a reason for hiding this comment

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

LGTM assuming the CI is happy.

@frederick-vs-ja
Copy link
Contributor Author

Merging as CI is all-green now.

@frederick-vs-ja frederick-vs-ja merged commit 619f478 into llvm:main Sep 5, 2025
78 checks passed
@frederick-vs-ja frederick-vs-ja deleted the libcxx-test-abi-umap-size branch September 5, 2025 09:46
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. test-suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants