PR 58191 patch

François Dumont frs.dumont@gmail.com
Fri Aug 30 20:25:00 GMT 2013


Hi

     I finally generalized  this method to other debug functions, it is 
more consistent and clean the implementation of the debug checks. For 
4.8 branch I will limit it to just what need to be really fixed.

2013-08-30  François Dumont  <fdumont@gcc.gnu.org>

     PR libstdc++/58191
     * include/debug/macros.h (__glibcxx_check_partitioned_lower): Add
     __gnu_debug::__base calls on iterators passed to internal debug
     check.
     (__glibcxx_check_partitioned_lower_pred): Likewise.
     (__glibcxx_check_partitioned_upper): Likewise.
     (__glibcxx_check_partitioned_upper_pred): Likewise.
     (__glibcxx_check_sorted): Likewise.
     (__glibcxx_check_sorted_pred): Likewise.
     (__glibcxx_check_sorted_set): Likewise.
     (__glibcxx_check_sorted_set_pred): Likewise.
     * include/debug/functions.h (__check_partitioned_lower):
     Remove code to detect safe iterators.
     (__check_partitioned_upper): Likewise.
     (__check_sorted): Likewise.

François


On 08/27/2013 11:08 PM, Paolo Carlini wrote:
> On 08/27/2013 10:57 PM, François Dumont wrote:
>> Hi
>>
>>     Here is a patch to fix the small PR 58191 regression. I don't 
>> remember why I hadn't used the __gnu_debug::__base from the start 
>> rather than trying to reproduce its behavior within the 
>> __check_partitioned* methods. This way we only detect random access 
>> safe iterator to enhance performance but do not check the iterator 
>> category otherwise, concept checks are there for that reason.
>>
>>     The patch is generated from the 4.8 branch. I still need to reg 
>> test it but if it succeeded is it ok to commit ? Just in trunk or 
>> also in 4.8 branch ?
> Thanks. Let's play safe, let's apply it to mainline and let's ask 
> people on the audit trail of the bug too to test it. If everything 
> goes well let's backport it to the branch in a few weeks.
>
> Thanks again,
> Paolo.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 58191.patch
Type: text/x-patch
Size: 12472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20130830/18559451/attachment.bin>


More information about the Libstdc++ mailing list