[PATCH][_GLIBCXX_DEBUG] Improve valid_range check

François Dumont frs.dumont@gmail.com
Fri Nov 22 17:38:00 GMT 2019


Hi

     I noticed that we are not checking that iterators are not singular 
in valid_range. Moreover __check_singular signature for pointers is not 
intercepting all kind of pointers in terms of qualification.

     I'd like to commit it next week but considering we are in stage 3 I 
need proper acceptance.

     * include/debug/functions.h: Remove <bits/move.h> include.
     (__check_singular_aux, __check_singular): Move...
     * include/debug/helper_functions.h:
     (__check_singular_aux, __check_singular): ...here.
     (__valid_range_aux): Adapt to use latter.
     * testsuite/25_algorithms/copy/debug/2_neg.cc: New.

Tested under Linux x86_64 normal and debug modes.

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: valid_range.patch
Type: text/x-patch
Size: 5181 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20191122/4653b991/attachment.bin>


More information about the Libstdc++ mailing list