Bug 1029217 - gcc-c++ std::nth_element segfaults on valid input
gcc-c++ std::nth_element segfaults on valid input
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-11 17:21 EST by Sergio Pascual
Modified: 2014-01-12 18:41 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-12 18:41:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 58800 None None None Never

  None (edit)
Description Sergio Pascual 2013-11-11 17:21:00 EST
Description of problem:

A valid c++ program like this segfaults:

#include <algorithm>

int main() {
 double mm[] = {2, 2, 3, 2};
 size_t ms = sizeof(mm) / sizeof(double);
 std::nth_element(mm, mm+1, mm+ms);
}

because nth_element is broken

The bug has been reported and fixed upstream
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800

Version-Release number of selected component (if applicable):
gcc-c++-4.8.2-1.fc20.x86_64
Comment 1 Sergio Pascual 2013-12-16 11:56:47 EST
This problem seems fixed in gcc-4.8.2-7.fc20.x86_64

Note You need to log in before you can comment on or make changes to this bug.