[libcxx-commits] [PATCH] D132769: [2b/3][ASan][libcxx] std::basic_string annotations

Tacet via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 20 19:56:48 PST 2023


AdvenamTacet updated this revision to Diff 499030.
AdvenamTacet added a comment.

I'm using previous diff for fuzzing to confirm that it's working at the moment, therefore I believe the implementation is correct.
But there is issue with Windows and Apple tests, described below. I believe, the main issue is: `constexpr evaluation hit maximum step limit; possible infinite loop?` in a tests, which I didn't modify.

>   Failed Tests (1):
>     apple-libc++-backdeployment.cfg.in :: std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp

This update:

- tries to solves an issue with wchars in a correct way (`#ifndef TEST_HAS_NO_WIDE_CHARACTERS`). Hopefully, this time everything will work.

Main problem:
I do not know how to fix the problem with Windows and Apple tests failing. I do not modify the failing test.
Below I post details, I will apprecieate every suggestion.

>   C:\ws\w32-1\llvm-project\libcxx-ci\libcxx\test\std\strings\basic.string\string.modifiers\string_insert\size_pointer_size.pass.cpp:403:17: error: static_assert expression is not an integral constant expression
>     static_assert(test<std::basic_string<char, std::char_traits<char>, min_allocator<char>>>());
>                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   C:/ws/w32-1/llvm-project/libcxx-ci/build/clang-cl-static/include/c++/v1\string:1714:15: note: constexpr evaluation hit maximum step limit; possible infinite loop?
>                 std::construct_at(std::addressof(__begin[__i]));
>                 ^
>   C:/ws/w32-1/llvm-project/libcxx-ci/build/clang-cl-static/include/c++/v1\string:2542:5: note: in call to '__begin_lifetime({&{*new char[192]#1220}[0]}, 192)'
>       __begin_lifetime(__p, __allocation.count);
>       ^
>   C:/ws/w32-1/llvm-project/libcxx-ci/build/clang-cl-static/include/c++/v1\string:3067:7: note: in call to '&s_short->__grow_by_and_replace(95, 0, 16, 0, 0, 16, &{*new char[96]#1219}[0])'
>         __grow_by_and_replace(__cap, 0, __sz, __pos, 0, __n, __s);
>         ^
>   C:\ws\w32-1\llvm-project\libcxx-ci\libcxx\test\std\strings\basic.string\string.modifiers\string_insert\size_pointer_size.pass.cpp:384:13: note: in call to '&s_short->insert(0, &{*new char[96]#1219}[0], 16)'
>       s_short.insert(0, s_short.data(), s_short.size());
>               ^
>   C:\ws\w32-1\llvm-project\libcxx-ci\libcxx\test\std\strings\basic.string\string.modifiers\string_insert\size_pointer_size.pass.cpp:403:17: note: in call to 'test()'
>     static_assert(test<std::basic_string<char, std::char_traits<char>, min_allocator<char>>>());

Therefore there is no attempt to fix it. I will apprecieate every suggestion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132769/new/

https://reviews.llvm.org/D132769

Files:
  libcxx/include/__string/extern_template_lists.h
  libcxx/include/string
  libcxx/test/std/strings/basic.string/string.asan/append.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/assign.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/capacity.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/concatenate.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/constructor.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/erase.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/insert.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/push_pop_back.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/replace.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/substr.pass.cpp
  libcxx/test/std/strings/basic.string/string.asan/swap.pass.cpp
  libcxx/test/support/asan_testing.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132769.499030.patch
Type: text/x-patch
Size: 159803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230221/fb84e90d/attachment-0001.bin>


More information about the libcxx-commits mailing list