[libc++abi] Fix alternate deletions in exhaustion tests - #193130
Merged
Conversation
Member
|
@llvm/pr-subscribers-libcxxabi Author: Daniel Rank (dwrank) ChangesFixes #192773 Verified the test passes. Full diff: https://github.com/llvm/llvm-project/pull/193130.diff 1 Files Affected:
diff --git a/libcxxabi/test/test_fallback_malloc.pass.cpp b/libcxxabi/test/test_fallback_malloc.pass.cpp
index 379fe57295cba..ea52fd1227724 100644
--- a/libcxxabi/test/test_fallback_malloc.pass.cpp
+++ b/libcxxabi/test/test_fallback_malloc.pass.cpp
@@ -115,7 +115,7 @@ void exhaustion_test1 () {
ptrs = alloc_series ( 32 );
std::printf("Allocated %zu 32 byte chunks\n", ptrs.size());
while ( ptrs.size () > 0 )
- fallback_free ( pop ( ptrs, ptrs.size () % 1 == 1 ));
+ fallback_free ( pop ( ptrs, ptrs.size () % 2 == 1 ));
print_free_list ();
}
@@ -151,7 +151,7 @@ void exhaustion_test2 () {
std::printf("Allocated %zu { 32, 48, 72, 108, 162 ... } byte chunks\n",
ptrs.size());
while ( ptrs.size () > 0 )
- fallback_free ( pop ( ptrs, ptrs.size () % 1 == 1 ));
+ fallback_free ( pop ( ptrs, ptrs.size () % 2 == 1 ));
print_free_list ();
}
@@ -185,7 +185,7 @@ void exhaustion_test3 () {
ptrs = alloc_series ( allocs, sizeof ( allocs ) / sizeof ( allocs[0] ));
std::printf("Allocated %zu chunks\n", ptrs.size());
while ( ptrs.size () > 0 )
- fallback_free ( pop ( ptrs, ptrs.size () % 1 == 1 ));
+ fallback_free ( pop ( ptrs, ptrs.size () % 2 == 1 ));
print_free_list ();
}
|
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
dwrank
force-pushed
the
fix-issue-192773
branch
from
April 21, 2026 02:33
829710f to
d248718
Compare
dwrank
force-pushed
the
fix-issue-192773
branch
from
April 21, 2026 02:36
d248718 to
c51cec4
Compare
ldionne
approved these changes
Jun 26, 2026
LouisLu060211
pushed a commit
to LouisLu060211/llvm-project
that referenced
this pull request
Jun 30, 2026
maarcosrmz
pushed a commit
to maarcosrmz/llvm-project
that referenced
this pull request
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #192773
Verified the test passes.