octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43640] mkoctfile -M infinite loop on arm64


From: Rafael Laboissiere
Subject: [Octave-bug-tracker] [bug #43640] mkoctfile -M infinite loop on arm64
Date: Wed, 19 Nov 2014 22:03:18 +0000
User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?43640>

                 Summary: mkoctfile -M infinite loop on arm64
                 Project: GNU Octave
            Submitted by: rlaboiss
            Submitted on: Wed 19 Nov 2014 10:03:17 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: Other

    _______________________________________________________

Details:

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:


echo > t.c
mkoctfile -M t.c
# it runs for ever


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


get_line (FILE *fp)
{
  static std::vector<char> buf (100);
  unsigned int idx = 0;
  char c;

  while (true)
    {
      c = static_cast<char> (gnulib::fgetc (fp));
      if (c == '\n' || c == EOF)
        break;


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


  int c;

  while (true)
    {
      c = gnulib::fgetc (fp);






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43640>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]