Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Oct 26, 2025

This patch contains several changes to deallocate_size.pass.cpp:

  1. static_cast-ing some parameters to size_t to avoid narrowing.
  2. Changing the type of loop variable i to unsigned int avoid signedness mismatch with the constructor parameter.
  3. Separately counting allocations and deallocations in variables allocated_ and deallocated_, and changing their type to uint64_t.
  4. Avoiding assert-ing count of allocations when a basic_string is allocated, just assert-ing after destruction instead.
@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner October 26, 2025 17:18
@frederick-vs-ja frederick-vs-ja added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. test-suite labels Oct 26, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 26, 2025

@llvm/pr-subscribers-libcxx

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

Changes

This patch contains several changes to deallocate_size.pass.cpp:

  1. static_cast-ing parameters to suitable types to avoid narrowing.
  2. Allowing allocated_ == 1 for MSVC STL because it dynamically allocates one container proxy object in debug modes.
  3. Changing the type of allocated_ to possibly larger and seemingly more appropriate ptrdiff_t.

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

1 Files Affected:

  • (modified) libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp (+10-5)
diff --git a/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp index 00f9e2b846783..b402bbc9bf823 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp @@ -12,12 +12,13 @@ #include <string> #include <cassert> +#include <cstddef> #include <cstdint> #include <type_traits> #include "test_macros.h" -static int allocated_; +static std::ptrdiff_t allocated_; template <class T, class Sz> struct test_alloc { @@ -40,13 +41,13 @@ struct test_alloc { TEST_CONSTEXPR test_alloc(const test_alloc<U, Sz>&) TEST_NOEXCEPT {} pointer allocate(size_type n, const void* = nullptr) { - allocated_ += n; - return std::allocator<value_type>().allocate(n); + allocated_ += static_cast<std::ptrdiff_t>(n); + return std::allocator<value_type>().allocate(static_cast<std::size_t>(n)); } void deallocate(pointer p, size_type s) { - allocated_ -= s; - std::allocator<value_type>().deallocate(p, s); + allocated_ -= static_cast<std::ptrdiff_t>(s); + std::allocator<value_type>().deallocate(p, static_cast<std::size_t>(s)); } template <class U> @@ -68,7 +69,11 @@ void test() { using Str = std::basic_string<char, std::char_traits<char>, test_alloc<char, Sz> >; { Str s(i, 't'); +#ifdef _MSVC_STL_VERSION // MSVC STL dynamically allocates one container proxy object in debug modes. + assert(allocated_ == 0 || allocated_ == 1 || allocated_ >= i); +#else // ^^^ MSVC STL / other vvv assert(allocated_ == 0 || allocated_ >= i); +#endif // ^^^ other ^^^ } } assert(allocated_ == 0); 
@frederick-vs-ja frederick-vs-ja force-pushed the libcxx-test-string-deallocate branch from d597c41 to 8fc6630 Compare October 28, 2025 02:45
This patch contains several changes to `deallocate_size.pass.cpp`: 1. `static_cast`-ing parameters to suitable types to avoid narrowing. 2. Changeing the type of `allocated_` to possibly larger and seemingly more appropriate `ptrdiff_t`. 3. Avoiding `assert`-ing count of allocations when a `basic_string` is allocated, just `assert`-ing after destruction instead.
@frederick-vs-ja frederick-vs-ja force-pushed the libcxx-test-string-deallocate branch from 8fc6630 to 44e2430 Compare October 28, 2025 02:53
@frederick-vs-ja frederick-vs-ja changed the title [libc++][test] Make deallocate_size.pass.cpp MSVC-STL-friendly [libc++][test] Make deallocate_size.pass.cpp MSVC-friendly Oct 28, 2025
@frederick-vs-ja frederick-vs-ja merged commit 73b092f into llvm:main Oct 31, 2025
78 checks passed
@frederick-vs-ja frederick-vs-ja deleted the libcxx-test-string-deallocate branch October 31, 2025 02:07
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-msan running on sanitizer-buildbot10 while building libcxx at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/94/builds/12230

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure) ... llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds. -- Testing: 92048 tests, 72 workers -- Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. FAIL: lld :: MachO/link-search-order.s (91798 of 92048) ******************** TEST 'lld :: MachO/link-search-order.s' FAILED ******************** Exit Code: -6 Command Output (stdout): -- # RUN: at line 4 rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD # executed command: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD # note: command had no output on stdout or stderr # RUN: at line 5 mkdir -p /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD # executed command: mkdir -p /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD # note: command had no output on stdout or stderr # RUN: at line 7 /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/libhello.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/hello.o # executed command: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/libhello.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/hello.o # note: command had no output on stdout or stderr # RUN: at line 8 ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -install_name @executable_path/libhello.dylib /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/hello.o -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/libhello.dylib # executed command: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -install_name @executable_path/libhello.dylib /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/hello.o -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/libhello.dylib # note: command had no output on stdout or stderr # RUN: at line 10 /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/libgoodbye.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o # executed command: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/libgoodbye.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o # note: command had no output on stdout or stderr # RUN: at line 11 ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -install_name @executable_path/libgoodbye.dylib /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD/libgoodbye.dylib # executed command: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -install_name @executable_path/libgoodbye.dylib /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD/libgoodbye.dylib # note: command had no output on stdout or stderr # RUN: at line 12 llvm-ar --format=darwin crs /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA/libgoodbye.a /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o # executed command: llvm-ar --format=darwin crs /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA/libgoodbye.a /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o # note: command had no output on stdout or stderr # RUN: at line 14 /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/link-search-order.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/test.o # executed command: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/link-search-order.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/test.o # note: command had no output on stdout or stderr # RUN: at line 17 Step 11 (stage2/msan check) failure: stage2/msan check (failure) ... llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds. -- Testing: 92048 tests, 72 workers -- Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. FAIL: lld :: MachO/link-search-order.s (91798 of 92048) ******************** TEST 'lld :: MachO/link-search-order.s' FAILED ******************** Exit Code: -6 Command Output (stdout): -- # RUN: at line 4 rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD # executed command: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD # note: command had no output on stdout or stderr # RUN: at line 5 mkdir -p /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD # executed command: mkdir -p /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD # note: command had no output on stdout or stderr # RUN: at line 7 /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/libhello.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/hello.o # executed command: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/libhello.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/hello.o # note: command had no output on stdout or stderr # RUN: at line 8 ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -install_name @executable_path/libhello.dylib /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/hello.o -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/libhello.dylib # executed command: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -install_name @executable_path/libhello.dylib /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/hello.o -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/libhello.dylib # note: command had no output on stdout or stderr # RUN: at line 10 /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/libgoodbye.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o # executed command: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/libgoodbye.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o # note: command had no output on stdout or stderr # RUN: at line 11 ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -install_name @executable_path/libgoodbye.dylib /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD/libgoodbye.dylib # executed command: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -install_name @executable_path/libgoodbye.dylib /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpD/libgoodbye.dylib # note: command had no output on stdout or stderr # RUN: at line 12 llvm-ar --format=darwin crs /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA/libgoodbye.a /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o # executed command: llvm-ar --format=darwin crs /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmpA/libgoodbye.a /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/goodbye.o # note: command had no output on stdout or stderr # RUN: at line 14 /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/link-search-order.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/test.o # executed command: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype obj -triple x86_64-apple-darwin /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/lld/test/MachO/link-search-order.s -o /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/MachO/Output/link-search-order.s.tmp/test.o # note: command had no output on stdout or stderr # RUN: at line 17 
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
…5162) This patch contains several changes to `deallocate_size.pass.cpp`: 1. `static_cast`-ing some parameters to `size_t` to avoid narrowing. 2. Changing the type of loop variable `i` to `unsigned int` avoid signedness mismatch with the constructor parameter. 3. Separately counting allocations and deallocations in variables `allocated_` and `deallocated_`, and changing their type to `uint64_t`. 4. Avoiding `assert`-ing count of allocations when a `basic_string` is allocated, just `assert`-ing after destruction instead.
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

4 participants