Bug 1026123 - bug in 4.8.2 breaks octave
Summary: bug in 4.8.2 breaks octave
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 19
Hardware: All
OS: Linux
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-03 23:48 UTC by Dmitri A. Sergatskov
Modified: 2014-01-03 22:17 UTC (History)
3 users (show)

Fixed In Version: gcc-4.8.2-7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-03 22:17:51 UTC
Type: Bug


Attachments (Terms of Use)

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.


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