[libcxx-commits] [PATCH] D128146: [libc++] Use uninitialized algorithms for vector
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 21 13:22:52 PDT 2022
philnik added a comment.
In D128146#3669817 <https://reviews.llvm.org/D128146#3669817>, @avogelsgesang wrote:
> From the expanded "All failed tests" section on https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/45513/testReport/
>
> Assertion failed: (isa<InjectedClassNameType>(Decl->TypeForDecl)), function getInjectedClassNameType, file /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/AST/ASTContext.cpp, line 4588.
> PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
> Stack dump:
> 0. HandleCommand(command = "expr s_vector.push({4})")
> 1. <eof> parser at end of file
> 2. /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include/c++/v1/stack:236:10: instantiating function definition 'std::stack<C, std::vector<C>>::push'
> 3. /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include/c++/v1/vector:577:36: instantiating function definition 'std::vector<C>::push_back'
> 4. /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include/c++/v1/vector:718:17: instantiating function definition 'std::vector<C>::__push_back_slow_path<C>'
> 5. /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include/c++/v1/vector:700:10: instantiating function definition 'std::vector<C>::__swap_out_circular_buffer'
> 6. /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include/c++/v1/__memory/uninitialized_algorithms.h:614:1: instantiating function definition 'std::__uninitialized_allocator_move_if_noexcept<std::allocator<C>, std::reverse_iterator<C *>, std::reverse_iterator<C *>, C, void>'
Is there any way to convert `TestStackFromStdModule.py` to a normal reproducer? Or is this specific to LLDB in some way? Sorry, I don't understand what the test is trying to achieve and what it does to do that. I guess it somehow creates a `std::stack<C, std::vector<C>>` and then does some operations on them? If the problem isn't the code itself I guess I have no way to fix it in this patch.
I tried
#include <cassert>
#include <stack>
struct C { C(int i_) : i{i_} {} int i; };
int main() {
std::stack<C, std::vector<C>> s_vector;
s_vector.push({4});
s_vector.pop();
s_vector.size();
s_vector.top();
s_vector.emplace(5);
assert(s_vector.top().i == 5);
}
but that is happy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128146/new/
https://reviews.llvm.org/D128146
More information about the libcxx-commits
mailing list