This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58800] [4.8.2/4.9 Regression] std::nth_element segfaults on valid input
- From: "luto at mit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 19 Oct 2013 00:13:43 +0000
- Subject: [Bug libstdc++/58800] [4.8.2/4.9 Regression] 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 #6 from Andy Lutomirski <luto at mit dot edu> ---
I changed two instances of __last - 2 to __last - 1. I'm running against
r203836 on gcc-4_8-branch.
The thing that caught it was an experiment, not part of my test suite, so this
is a little tricky. It already survived longer than the unpatched version did.
The crash wasn't the same segfault, though -- it was a much later crash due to
memory corruption. I'll let it run for a while under valgrind to see what, if
anything, pops up.