Re: [Bug libstdc++/99402] [10/11 Regression] std::copy creates _GLIBCXX_DEBUG false positive for attempt to subscript a dereferenceable (start-of-sequence) iterator

2021-04-09 Thread François Dumont via Gcc-patches
On 08/04/21 3:07 pm, Jonathan Wakely wrote: On 11/03/21 18:51 +0100, François Dumont via Libstdc++ wrote: I eventually prefer to propose this version. Compared to the previous one I have the _M_can_advance calling the former one with correct number of elements to check for advance. And the

Re: [Bug libstdc++/99402] [10/11 Regression] std::copy creates _GLIBCXX_DEBUG false positive for attempt to subscript a dereferenceable (start-of-sequence) iterator

2021-04-08 Thread Jonathan Wakely via Gcc-patches
On 11/03/21 18:51 +0100, François Dumont via Libstdc++ wrote: I eventually prefer to propose this version. Compared to the previous one I have the _M_can_advance calling the former one with correct number of elements to check for advance. And the former _M_can_advance is also properly making

Re: [Bug libstdc++/99402] [10/11 Regression] std::copy creates _GLIBCXX_DEBUG false positive for attempt to subscript a dereferenceable (start-of-sequence) iterator

2021-03-11 Thread François Dumont via Gcc-patches
I eventually prefer to propose this version. Compared to the previous one I have the _M_can_advance calling the former one with correct number of elements to check for advance. And the former _M_can_advance is also properly making use of the __dp_sign_max_size precision. Here is the

Re: [Bug libstdc++/99402] [10/11 Regression] std::copy creates _GLIBCXX_DEBUG false positive for attempt to subscript a dereferenceable (start-of-sequence) iterator

2021-03-07 Thread François Dumont via Gcc-patches
Here is the patch to correctly deal with the new __dp_sign_max_size. I prefer to introduce new __can_advance overloads for this to correctly deal with the _Distance_precision in it. _M_valid_range was also ignoring __dp_sign_max_size.     libstdc++: [_GLIBCXX_DEBUG] Fix management of