[Bug 1322707] [NEW] Patching known bug in stl_algo.h in gcc 4.8.2 in trusty

OpenFOAM c.greenshields at openfoam.org
Fri May 23 17:24:23 UTC 2014


Public bug reported:

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

** Affects: gcc-4.8 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.8 in Ubuntu.
https://bugs.launchpad.net/bugs/1322707

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

Status in “gcc-4.8” package in Ubuntu:
  New

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1322707/+subscriptions



More information about the foundations-bugs mailing list