<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - include/c++/v1/list:507: _LIBCPP_ASSERT '__get_const_db()->__decrementable(this)' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=35564">35564</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>include/c++/v1/list:507: _LIBCPP_ASSERT '__get_const_db()->__decrementable(this)' failed.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pawel_sikora@zoho.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>#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@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>
<span class="quote">>::remove (this=0x7fffffffdcc0, __x=@0x7fffffffdcac: 1) at</span >
/home/pawels/aldec/dvm/clang-support/toolchain/llvm/sysroot/bin/../include/c++/v1
/list:2109
#6  0x000000000040127b in main () at bug.cpp:5</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>