New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include/c++/v1/list:507: _LIBCPP_ASSERT '__get_const_db()->__decrementable(this)' failed. #34912
Comments
assigned to @mclow |
I get lots of link errors when I try to build this. (Mac OS X) Undefined symbols for architecture x86_64: |
Ok; building with a libc++ that I built myself, this links. |
I can reproduce, but I don't immediately know how to fix it. My initial attempts just made the reproduce hang indefinitely. I'll look at this more when I have time next week. |
This should be fixed in r323390. |
Hi Marshall, Is this OK to merge? |
I'm assuming that you're talking about merging for 6.0.1. |
Merged: r334621 |
mentioned in issue #35997 |
Extended Description
#include
int main()
{
std::list< int > l = { 1 };
l.remove( 1 );
return 0;
}
$ clang++ bug.cpp -o bug -std=c++1y -stdlib=libc++ -D_LIBCPP_DEBUG=1 -ggdb
$ ./bug
(...)/include/c++/v1/list:507: _LIBCPP_ASSERT '__get_const_db()->__decrementable(this)' failed. Attempted to decrement non-decrementable list::const_iterator
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff6fe03b1 in __GI_abort () at abort.c:79
#2 0x00007ffff7b5f6b2 in std::__1::__libcpp_abort_debug_function (info=...) at /home/builder/toolchain/llvm/llvm/projects/libcxx/src/debug.cpp:40
#3 0x0000000000404876 in std::__1::__list_const_iterator<int, void*>::operator-- (this=0x7fffffffd5d8) at /home/pawels/aldec/dvm/clang-support/toolchain/llvm/sysroot/bin/../include/c++/v1/list:506
#4 std::__1::list<int, std::__1::allocator >::splice (this=0x7fffffffd648, __p=..., __c=..., __f=..., __l=...) at /home/pawels/aldec/dvm/clang-support/toolchain/llvm/sysroot/bin/../include/c++/v1/list:2068
#5 0x0000000000402690 in std::__1::list<int, std::__1::allocator >::remove (this=0x7fffffffdcc0, __x=@0x7fffffffdcac: 1) at /home/pawels/aldec/dvm/clang-support/toolchain/llvm/sysroot/bin/../include/c++/v1
/list:2109
#6 0x000000000040127b in main () at bug.cpp:5
The text was updated successfully, but these errors were encountered: