id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8685,lockfree spsc_queue iterator pop failure,meyers@…,timblechmann,"In the case where the producer has populated with N items such that they wrap around the end of the ring buffer, and the consumer uses the pop() interface with an output iterator, the pop method splits the copying into two chunks. The problem is that both calls to std::copy use the same destination value. {{{ size_t count0 = max_size - read_index; size_t count1 = avail - count0; std::copy(internal_buffer + read_index, internal_buffer + max_size, it); std::copy(internal_buffer, internal_buffer + count1, it); }}} What we see is pop() returns 2 (in the case where N == 2), but what's read is the last value added, then some old value which happened to be there from before. The N-1 value is lost. Should the second call to std::copy be: {{{ std::copy(internal_buffer, internal_buffer + count1, it + count0); }}} ",Bugs,closed,To Be Determined,lockfree,Boost 1.53.0,Problem,fixed,,