[Bug libstdc++/61107] stl_algo.h: std::__inplace_stable_partition() doesn't process the whole data range

François Dumont frs.dumont@gmail.com
Mon Nov 10 20:50:00 GMT 2014


Any news about this one ?

Here is another version with additional random tests on algos just to 
challenge other combinations of tests.

     PR libstdc++/61107
     * include/bits/stl_algo.h (__inplace_stable_partition): Delete.
     (__stable_partition_adaptive): Return __first is range length is 1.
     (__stable_partition): Adapt.
     * testsuite/util/testsuite_new_operators.h: New.
     * testsuite/25_algorithms/stable_sort/1.cc: Test algo in simulated
     constraint memory context.
     * testsuite/25_algorithms/inplace_merge/1.cc: Likewise.
     * testsuite/25_algorithms/stable_partition/1.cc: Likewise.
     * testsuite/25_algorithms/stable_sort/4.cc: New.
     * testsuite/25_algorithms/inplace_merge/2.cc: New.
     * testsuite/25_algorithms/stable_partition/2.cc: New.


Ok to commit ?

François

On 17/10/2014 22:46, François Dumont wrote:
> Hi
>
>     As proposed in the bug report I just removed the 
> __inplace_stable_partition as __stable_partition_adaptive is able to 
> handle a 0 buffer size.
>
>     To test this bug I introduced overloads of new/delete operators in 
> the testsuite utils. The existing set_memory_limits has no impact on 
> new operator. I wonder if some test using it really have the expected 
> behavior.
>
>     I also tests other algos that try to use a buffer and didn't found 
> any issue. Those algos however can't be simplified like stable_partition.
>
> 2014-10-16  François Dumont <fdumont@gcc.gnu.org>
>
>     PR libstdc++/61107
>     * include/bits/stl_algo.h (__inplace_stable_partition): Delete.
>     (__stable_partition): Adapt.
>     * testsuite/util/testsuite_new_operators.h: New.
>     * testsuite/25_algorithms/stable_sort/1.cc: Test algo in simulated
>     constraint memory context.
>     * testsuite/25_algorithms/inplace_merge/1.cc: Likewise.
>     * testsuite/25_algorithms/stable_partition/1.cc: Likewise.
>
> Tested under Linux x86_64.
>
> Ok to commit ?
>
> François

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


More information about the Libstdc++ mailing list