bugGNU Octave - Bugs: bug #41831, image 2.2.1 - miscomilation of...

 
 

bug #41831: image 2.2.1 - miscomilation of bwdist.cc on i386

Submitted by:  Thomas Weber <tweber>
Submitted on:  Tue 11 Mar 2014 08:27:52 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: otherOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 11 Mar 2014 04:20:28 PM UTC, comment #1:

Hi Thomas, thank for you reporting this bug.

I have already fixed this with cset 43cd1c5e0955. As you, I couldn't find any issue with the code and could only reproduce on i686. I found that changing those variable to double fixes it. Also, changing the sqrt2_1 inside quasi_euclidean() to double would also fix it. I still think there must be a proper fix somewhere else, but for the time being, this seems to work.

Also, this bug happens in one of the tests, but it was luck. When I tried with random matrices, only some of them would trigger it.

By the way, this problem should already been present on the image package version 2.2.0. It was caused in 27d87f06dd99 when I changed from double to single for Matlab compatibility.

Carnë Draug <carandraug>
Project Member
Tue 11 Mar 2014 08:27:52 AM UTC, original submission:

Hi,
we are seeing a miscompilation of bwdist in Debian for the i386 (32bit, x86) platfor. When compiled with -O2, the test suite hangs in an infinite loop. Investigation showed that the problem occurs in the quasi-euclidean test case (and only there). We tried gcc 4.8 and 4.9, both exhibit this problem.
Marking newdist2 as volatile (volatile float newdist2;) fixed this issue as well. However, I don't see a problem in the code, so this may indeed be a problem with gcc. Using clang 3.5 does not exhibit this problem, either.

Thomas Weber <tweber>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tweber (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 11 Mar 2014 04:20:28 PM UTCcarandraugStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1