bugGNU Octave - Bugs: bug #43640, mkoctfile -M infinite loop on arm64

 
 

bug #43640: mkoctfile -M infinite loop on arm64

Submitted by:  Rafael Laboissiere <rlaboiss>
Submitted on:  Wed 19 Nov 2014 10:03:17 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.2Operating System: Other

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 02 Dec 2014 10:45:23 AM UTC, comment #2:

Dear Sébastien and Edmund,
thank you for your patch. I've pushed to stable with cset 7759e4d62f04 (http://hg.savannah.gnu.org/hgweb/octave/rev/7759e4d62f04)

Closing as fixed.

Andreas Weber <andy1978>
Project Member
Mon 01 Dec 2014 08:48:28 PM UTC, comment #1:

I confirm this issue. Actually it affects all architectures where char is unsigned (which means ARM, PowerPC and several other less popular platforms in Debian).

On those archs, since char is unsigned, in function get_line of src/mkoctfile.in.cc, "c" can never be equal to EOF (because EOF is -1). Hence the infinite loop.

I attach the patch that I applied to the Debian package.

(file #32580)

Sébastien Villemot <svillemot>
Wed 19 Nov 2014 10:03:17 PM UTC, original submission:

I am hereby forwarding a bug report filed by Edmund Grimley Evans against the Debian package octave. The bug is claimed to happen on the arm64 architecture. I did not test it in the said architecture. The full report is here:

https://bugs.debian.org/770192

The reporter wrote, essentially this:

[snip]

On arm64 mkoctfile -M goes into an infinite loop:

This may be because of this code in src/mkoctfile.in.cc:

On architectures where plain char is unsigned, c == EOF will always be false. Just use:

Rafael Laboissiere <rlaboiss>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #32580:  mkoctfile-infinite-loop.patch added by svillemot (783B - text/x-diff - Patch applied in Debian)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by svillemot (Updated the item)
  • -unavailable- added by rlaboiss (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 02 Dec 2014 10:45:23 AM UTCandy1978StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 01 Dec 2014 08:48:28 PM UTCsvillemotAttached File-=>Added mkoctfile-infinite-loop.patch, #32580

    Back to the top


    Powered by Savane 3.1-cleanup1