This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58800] [4.8 regression, I think] std::nth_element segfaults on valid input
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Oct 2013 23:17:17 +0000
- Subject: [Bug libstdc++/58800] [4.8 regression, I think] std::nth_element segfaults on valid input
- Auto-submitted: auto-generated
- References: <bug-58800-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I can also reproduce with something this simple:
std::vector<int> v = {
207089,
202585,
180067,
157549,
211592,
216096,
207089
};
-D_GLIBCXX_DEBUG reveals that we are dereferencing a past-the-end iterator. We
badly need a quick fix. Say 2-3 day max or we have to revert the fix for 58437.