Bug 1029217

Summary: gcc-c++ std::nth_element segfaults on valid input
Product: [Fedora] Fedora Reporter: Sergio Pascual <sergio.pasra>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: ben, jakub, laurent.rineau__fedora, law
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-12 23:41:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sergio Pascual 2013-11-11 22:21:00 UTC
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 16:56:47 UTC
This problem seems fixed in gcc-4.8.2-7.fc20.x86_64