Comment 13 for bug 1246802

Revision history for this message
In , Glisse-6 (glisse-6) wrote :

{0, 1, 2, 0} should be enough.

__unguarded_partition only stops increasing __first when *__first is not smaller than the pivot. If all elements are smaller than the pivot, boom. And when we have fewer than 5 elements (the check in __introselect is only for > 3), the pivot selection code doesn't guarantee that (some of the 3 pointers used to compute the median are the same, and with Paolo's change they become distinct).