As implemented, calling release() on a pmr::monotonic_buffer_resource leaves it in an inconsistent state, and this means calling allocate() can return a pointer to memory freed by the call to release().
The 1.65.1 implementation of release() only resets one of the member variables:
As implemented, calling
release()
on apmr::monotonic_buffer_resource
leaves it in an inconsistent state, and this means callingallocate()
can return a pointer to memory freed by the call torelease()
.The 1.65.1 implementation of
release()
only resets one of the member variables:The member variables
m_current_buffer
andm_current_buffer_size
(used indo_allocate()
) are untouched.