Bug 1029217 - gcc-c++ std::nth_element segfaults on valid input
Summary: gcc-c++ std::nth_element segfaults on valid input
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-11 22:21 UTC by Sergio Pascual
Modified: 2014-01-12 23:41 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-12 23:41:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 58800 0 None None None Never

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


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