[llvm-bugs] [Bug 35564] New: include/c++/v1/list:507: _LIBCPP_ASSERT '__get_const_db()->__decrementable(this)' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 7 12:42:24 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=35564

            Bug ID: 35564
           Summary: include/c++/v1/list:507: _LIBCPP_ASSERT
                    '__get_const_db()->__decrementable(this)' failed.
           Product: libc++
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pawel_sikora at zoho.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

#include <list>
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 at 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<int> >::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<int>
>::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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171207/080b1533/attachment.html>


More information about the llvm-bugs mailing list