Bug 1026123

Summary: bug in 4.8.2 breaks octave
Product: [Fedora] Fedora Reporter: Dmitri A. Sergatskov <dasergatskov>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: jakub, law, orion
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-4.8.2-7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-03 22:17:51 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 Dmitri A. Sergatskov 2013-11-03 23:48:02 UTC
Description of problem:

Due to a bug in include/bits/stl_algo.h 
gcc-4.8.2 (20131017 (Red Hat 4.8.2-1)) miscompiles
function "median" in octave (and probably some other 
numerical packages). 

Version-Release number of selected component (if applicable):
gcc version 4.8.2 20131017 (Red Hat 4.8.2-1) (GCC) 


How reproducible:
100%

Steps to Reproduce:

run "test median" in the octave binary compiled with
4.8.2. You will see something like:


:1> test median
  ***** assert (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2);
!!!!! test failed
ASSERT errors for:  assert (median (b, 3),(y (:, :, 3, :) + y (:, :, 4, :)) / 2)

  Location  |  Observed  |  Expected  |  Reason
 (3,1,1,2)   -6.741665460015373e+277         0.6608      Abs err 6.7417e+277 exceeds tol 0
 (3,2,1,4)   0.7306785881519318        0.8        Abs err 0.069324 exceeds tol 0
shared variables 
  

Additional info:

More on the problem with octave see:

http://savannah.gnu.org/bugs/?40436

The bug has been fixed in gcc branch:
http://gcc.gnu.org/viewcvs/gcc/branches/gcc-4_8-branch/libstdc%2B%2B-v3/include/bits/stl_algo.h?r1=203873&r2=203872&pathrev=203873

http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=203874

Please issue an update that includes this fix.

Comment 1 Orion Poplawski 2014-01-03 22:17:51 UTC
I'm pretty sure this is fixed in gcc-4.8.2-7.