Re: Maybe g++ bug (in stl_algo.h 0x08048beb in std::__unguarded_partition)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 22, 2008 at 19:29, Niklaus <niklaus@xxxxxxxxx> wrote:
> yes it fails on strict weak ordering , andreas schwab too said the same.
> Why does it  give Segfault.  Is some optimization done with strict
> weak ordering  ?
>

I don't think it's an optimization; it's just the way the logic works.

If the predicate is admissible, there's always one ordering of a and b
such that it returns false.  If they're the same, your inadmissible
predicate returns true, which could quite plausibly lead to an
algorithm thinking that they're not in order and doing another
iteration, which eventually means some values go out of range.

Just like binary_search won't find anything with that predicate, etc.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux