Re: PR libstdc++/60587

2014-03-21 Thread Jonathan Wakely
On 20/03/14 20:29 +, Jonathan Wakely wrote: Everything passes for make check check-debug, so I plan to commit it tomorrow, unless anyone points out a problem. Committed to trunk. PR libstdc++/60587 * include/debug/functions.h (_Is_contiguous_sequence): Define

Re: PR libstdc++/60587

2014-03-20 Thread Jonathan Wakely
Wakely jwak...@redhat.com Date: Thu Mar 20 19:23:23 2014 + PR libstdc++/60587 * include/debug/functions.h (_Is_contiguous_sequence): Define. (__foreign_iterator): Accept additional iterator. Do not dispatch on iterator category. (__foreign_iterator_aux2

PR libstdc++/60587

2014-03-19 Thread Jonathan Wakely
I'm debugging http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60587 and have found a number of problems. Firstly, the bug report is correct, this overload dereferences the __other argument without checking if that is OK: templatetypename _Iterator, typename _Sequence, typename _InputIterator

Re: PR libstdc++/60587

2014-03-19 Thread Jonathan Wakely
On 19/03/14 21:39 +, Jonathan Wakely wrote: I think the safe thing to do is (as I suggested at the time) to have a trait saying which iterator types refer to contiguous memory. Our debug mode only supports our own containers, so the ones which are contiguous are known. For 4.9.0 I think the

Re: PR libstdc++/60587

2014-03-19 Thread Paolo Carlini
Hi On 19/mar/2014, at 23:28, Jonathan Wakely jwak...@redhat.com wrote: On 19/03/14 21:39 +, Jonathan Wakely wrote: I think the safe thing to do is (as I suggested at the time) to have a trait saying which iterator types refer to contiguous memory. Our debug mode only supports our own