Patching known bug in stl_algo.h in gcc 4.8.2 in trusty

Bug #1322707 reported by OpenFOAM
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.8 (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned

Bug Description

There is a known bug in gcc 4.8.2 which needs fixing before we can compile and release our software OpenFOAM with Ubuntu 14.04. The bug and fix are reported here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800

To summarise, in include/bits/stl_algo.h, the change indicated by +/- is required in the following function:

  template<typename _RandomAccessIterator, typename _Compare>
    inline _RandomAccessIterator
    __unguarded_partition_pivot(_RandomAccessIterator __first,
     _RandomAccessIterator __last, _Compare __comp)
     {
       _RandomAccessIterator __mid = __first + (__last - __first) / 2;
- std::__move_median_to_first(__first, __first + 1, __mid, (__last - 2),
+ std::__move_median_to_first(__first, __first + 1, __mid, (__last - 1),
       __comp);
       return std::__unguarded_partition(__first + 1, __last, __first, __comp);
     }

Is it possible to fix this bug into an updated version of 4.8.2 on 14.04?

Thanks,

Chris

Tags: patch trusty
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and help making Ubuntu better.

I added the "patch" tag to this bug report and subscribed ~ubuntu-reviewers which is the team responsible for reviewing patches.

tags: added: patch trusty
Revision history for this message
Matthias Klose (doko) wrote :

the upstream issue references an issue which was fixed upstream in October 2013. It is fixed in the gcc-4.8 package in trusty and utopic.

Changed in gcc-4.8 (Ubuntu):
status: New → Fix Released
Changed in gcc-4.8 (Ubuntu Trusty):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.