[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 22:14:00 GMT 2014


     I introduced the random tests after Christopher Jefferson request 
to have more intensive tests on those algos. Is it the whole stuff of 
tests using random numbers that you don't like or just the usage of 
mt19937 ? If second is this new version using the usual random_device I 
used so far better ?

If it is the whole usage of random numbers that you don't like I will 
simply get rid of the new tests files.

François

On 10/11/2014 22:45, Jonathan Wakely wrote:
> On 10/11/14 21:50 +0100, François Dumont wrote:
>> 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.
>
> The first "is" should be "if".
>
> The change to stl_algo.h looks OK.
>
> I don't like the use of mt19937 in the tests, I know you committed a
> test I wrote recently that uses mt19937, but that was only meant to
> demonstrate the bug for bugzilla, not necessarily as the final test.
>
> The PRNG produces the exact same sequence of numbers every time (when
> you don't seed it) so if you can make the test fail using a few
> iterations with the PRNG then you can find the input that fails and
> just add that input to the testsuite. I didn't do that for the test I
> put in bugzilla because I didn't have time to work out which input
> caused the memory leak, only that it leaked for *some* easily
> reproducible input. I wasn't trying to start a trend where we use
> fixed sequences of pseudorandom numbers in lots of tests.
>
>

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


More information about the Libstdc++ mailing list