forked from OSchip/llvm-project
Fix use after free and calls to operator comma in debug mode
llvm-svn: 232703
This commit is contained in:
parent
0ddc6160ec
commit
61bff61926
|
@ -1480,7 +1480,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
|
|||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
for (++__f; __f != __l; ++__f, ++__e, ++__ds)
|
||||
for (++__f; __f != __l; ++__f, (void) ++__e, (void) ++__ds)
|
||||
{
|
||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||
__node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), *__f);
|
||||
|
|
|
@ -214,10 +214,10 @@ __libcpp_db::__erase_i(void* __i)
|
|||
else
|
||||
q->__next_ = p->__next_;
|
||||
__c_node* c = p->__c_;
|
||||
free(p);
|
||||
--__isz_;
|
||||
if (c != nullptr)
|
||||
c->__remove(p);
|
||||
free(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue