Debian Bug report logs - #770192
octave: mkoctfile -M infinite loop maybe because (char)c != EOF

version graph

Package: src:octave; Maintainer for src:octave is Debian Octave Group <team+pkg-octave-team@tracker.debian.org>;

Affects: octave-linear-algebra, vlfeat

Reported by: Edmund Grimley Evans <edmund.grimley.evans@gmail.com>

Date: Wed, 19 Nov 2014 15:39:01 UTC

Severity: important

Tags: upstream

Found in version octave/3.8.2-3

Fixed in version octave/3.8.2-4

Done: Sébastien Villemot <sebastien@debian.org>

Bug is archived. No further changes may be made.

Forwarded to https://savannah.gnu.org/bugs/index.php?43640

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>:
Bug#770192; Package src:octave. (Wed, 19 Nov 2014 15:39:06 GMT) (full text, mbox, link).


Acknowledgement sent to Edmund Grimley Evans <edmund.grimley.evans@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>. (Wed, 19 Nov 2014 15:39:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Edmund Grimley Evans <edmund.grimley.evans@gmail.com>
To: submit@bugs.debian.org
Subject: octave: mkoctfile -M infinite loop maybe because (char)c != EOF
Date: Wed, 19 Nov 2014 15:37:46 +0000
Source: octave
Version: 3.8.2-3

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. I suggest changing the type of c and the static_cast to "int".

Note that vlfeat is failing to build on arm64 apparently because of
mkoctfile -M timing out:

/usr/bin/mkoctfile -I. -I./toolbox -M "./toolbox/geometry/vl_rodr.c"
E: Caught signal ‘Terminated’: terminating immediately
make: *** [build-arch] Terminated

See:

http://buildd.debian.org/status/package.php?p=vlfeat&suite=sid

Would it be worth adding a simple test to octave so that this problem
with mkoctfile is discovered when building octave rather than later?



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>:
Bug#770192; Package src:octave. (Wed, 19 Nov 2014 20:03:04 GMT) (full text, mbox, link).


Acknowledgement sent to Edmund Grimley Evans <edmund.grimley.evans@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>. (Wed, 19 Nov 2014 20:03:04 GMT) (full text, mbox, link).


Message #10 received at 770192@bugs.debian.org (full text, mbox, reply):

From: Edmund Grimley Evans <edmund.grimley.evans@gmail.com>
To: 770192@bugs.debian.org
Subject: Re: octave: mkoctfile -M infinite loop maybe because (char)c != EOF
Date: Wed, 19 Nov 2014 19:54:36 +0000
There is no need for the cast. Just use:

  int c;

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



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>:
Bug#770192; Package src:octave. (Wed, 19 Nov 2014 22:39:08 GMT) (full text, mbox, link).


Acknowledgement sent to Rafael Laboissiere <rafael@laboissiere.net>:
Extra info received and forwarded to list. Copy sent to Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>. (Wed, 19 Nov 2014 22:39:08 GMT) (full text, mbox, link).


Message #15 received at 770192@bugs.debian.org (full text, mbox, reply):

From: Rafael Laboissiere <rafael@laboissiere.net>
To: Edmund Grimley Evans <edmund.grimley.evans@gmail.com>, 770192@bugs.debian.org
Subject: Re: [Pkg-octave-devel] Bug#770192: octave: mkoctfile -M infinite loop maybe because (char)c != EOF
Date: Wed, 19 Nov 2014 23:07:59 +0100
Control: tags -1 + upstream
Control: forwarded -1 https://savannah.gnu.org/bugs/index.php?43640

* Edmund Grimley Evans <edmund.grimley.evans@gmail.com> [2014-11-19 15:37]:

> On arm64 mkoctfile -M goes into an infinite loop:
>
> echo > t.c 
> mkoctfile -M t.c 
> # it runs for ever
>
> [snip]

Thanks for your bug report.  I forwarded it upstream.

Rafael



Added tag(s) upstream. Request was from Rafael Laboissiere <rafael@laboissiere.net> to 770192-submit@bugs.debian.org. (Wed, 19 Nov 2014 22:39:08 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to 'https://savannah.gnu.org/bugs/index.php?43640'. Request was from Rafael Laboissiere <rafael@laboissiere.net> to 770192-submit@bugs.debian.org. (Wed, 19 Nov 2014 22:39:09 GMT) (full text, mbox, link).


Severity set to 'important' from 'normal' Request was from Sébastien Villemot <sebastien@debian.org> to control@bugs.debian.org. (Mon, 24 Nov 2014 19:33:20 GMT) (full text, mbox, link).


Added indication that 770192 affects vlfeat and octave-linear-algebra Request was from Sébastien Villemot <sebastien@debian.org> to control@bugs.debian.org. (Mon, 24 Nov 2014 19:33:21 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>:
Bug#770192; Package src:octave. (Mon, 01 Dec 2014 20:48:04 GMT) (full text, mbox, link).


Acknowledgement sent to Sébastien Villemot <sebastien@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>. (Mon, 01 Dec 2014 20:48:05 GMT) (full text, mbox, link).


Message #28 received at 770192@bugs.debian.org (full text, mbox, reply):

From: Sébastien Villemot <sebastien@debian.org>
To: 770192@bugs.debian.org
Cc: control@bugs.debian.org
Subject: [pkg-octave/master] mkoctfile-infinite-loop.patch: fix infinite loop of mkoctfile -M on platforms where char is unsigned.
Date: Mon, 01 Dec 2014 20:45:31 +0000
tag 770192 pending
thanks

Date: Mon Dec 1 21:25:46 2014 +0100
Author: Sébastien Villemot <sebastien@debian.org>
Commit ID: 48b6568e0e4de69089573411d15e70a6c59f7a64
Commit URL: http://anonscm.debian.org/gitweb/?p=pkg-octave/octave.git;a=commitdiff;h=48b6568e0e4de69089573411d15e70a6c59f7a64
Patch URL: http://anonscm.debian.org/gitweb/?p=pkg-octave/octave.git;a=commitdiff_plain;h=48b6568e0e4de69089573411d15e70a6c59f7a64

    mkoctfile-infinite-loop.patch: fix infinite loop of mkoctfile -M on platforms where char is unsigned.

    Closes: #770192
      



Added tag(s) pending. Request was from Sébastien Villemot <sebastien@debian.org> to control@bugs.debian.org. (Mon, 01 Dec 2014 20:48:12 GMT) (full text, mbox, link).


Reply sent to Sébastien Villemot <sebastien@debian.org>:
You have taken responsibility. (Mon, 01 Dec 2014 21:24:21 GMT) (full text, mbox, link).


Notification sent to Edmund Grimley Evans <edmund.grimley.evans@gmail.com>:
Bug acknowledged by developer. (Mon, 01 Dec 2014 21:24:21 GMT) (full text, mbox, link).


Message #35 received at 770192-close@bugs.debian.org (full text, mbox, reply):

From: Sébastien Villemot <sebastien@debian.org>
To: 770192-close@bugs.debian.org
Subject: Bug#770192: fixed in octave 3.8.2-4
Date: Mon, 01 Dec 2014 21:21:44 +0000
Source: octave
Source-Version: 3.8.2-4

We believe that the bug you reported is fixed in the latest version of
octave, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 770192@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sébastien Villemot <sebastien@debian.org> (supplier of updated octave package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 01 Dec 2014 21:25:52 +0100
Source: octave
Binary: octave octave-dbg octave-common octave-doc octave-htmldoc octave-info liboctave2 liboctave-dev
Architecture: source amd64 all
Version: 3.8.2-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>
Changed-By: Sébastien Villemot <sebastien@debian.org>
Description:
 liboctave-dev - Development files for the GNU Octave language
 liboctave2 - Shared libraries of the GNU Octave language
 octave     - GNU Octave language for numerical computations
 octave-common - architecture-independent files for octave
 octave-dbg - Debug symbols for octave
 octave-doc - PDF documentation on the GNU Octave language
 octave-htmldoc - HTML documentation on the GNU Octave language
 octave-info - GNU Info documentation on the GNU Octave language
Closes: 770192
Changes:
 octave (3.8.2-4) unstable; urgency=medium
 .
   * mkoctfile-infinite-loop.patch: fix infinite loop of mkoctfile -M on
     platforms where char is unsigned. (Closes: #770192)
Checksums-Sha1:
 a46cf0407a2a165cfefb850ee1ed341ee8db79cf 2952 octave_3.8.2-4.dsc
 9371bb15604299de8e303da0a49493806b34c9a1 59248 octave_3.8.2-4.debian.tar.xz
 82badd103b6ffdee064b626cf0188e35aae7dfd7 1379996 octave-common_3.8.2-4_all.deb
 fbabedde5d35f4e8f911dec2621d4f61b9ffa615 3898000 octave-doc_3.8.2-4_all.deb
 037208a083808329dc6dd543a039014de8822f29 1748902 octave-htmldoc_3.8.2-4_all.deb
 cac9ca0a06deb9221a8434279b93a8620cae8fcd 916462 octave-info_3.8.2-4_all.deb
Checksums-Sha256:
 1af42ca17db82beef96c6763b0779c03735fbdbfa2634cab74eb0ce656079fa9 2952 octave_3.8.2-4.dsc
 f78774fa1c5af89087ab31c14cebdb8d07a7677936afa66c3755441c3c553c89 59248 octave_3.8.2-4.debian.tar.xz
 612d8668071c98fe262b8c1af00a08043391999df56fd1baa82365cc796c0d2c 1379996 octave-common_3.8.2-4_all.deb
 569abfa9b1319c0605496495cce9244ef76e2a4bed7ff77467c06c025dc592d4 3898000 octave-doc_3.8.2-4_all.deb
 779cb2daa5c61aa4d4a159c272360e5454b423a2683104dd4eab7e687c7425fb 1748902 octave-htmldoc_3.8.2-4_all.deb
 cba2164c151d761b99c16eb20911167aa7a634bc88eed36c3644a952bcd45c32 916462 octave-info_3.8.2-4_all.deb
Files:
 452436565d0b18fa2497e6d54d335f80 2952 math optional octave_3.8.2-4.dsc
 4130d1ceea2482f93b60015f81e40fc4 59248 math optional octave_3.8.2-4.debian.tar.xz
 ee0b51a87ab7189dfd85068f7afbf379 1379996 math optional octave-common_3.8.2-4_all.deb
 daf66b1d5d1b030471ab161d3b25cd43 3898000 doc optional octave-doc_3.8.2-4_all.deb
 7a45ca934a19c89cd38a71c2f858d962 1748902 doc optional octave-htmldoc_3.8.2-4_all.deb
 aab76c3822b32961d101e3cdfa56b7a7 916462 doc optional octave-info_3.8.2-4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJUfNNYAAoJECzs6TUOzr5KyvsP/1JCMrOs+4yGNzW/L2qvvoX5
anZ7+kG5hfrHnVYqsGpBw1VIYIVnFrTYDS5wt9AZ5Ek3cApmzLpFlO2dMWFpxd8x
kNQwYt5UlOySRn2lT+zqJQlDGhHsQXPuVexV/vv7jpzFqk+cw+1PyW1RrtG5/UtN
MNxjDgVN3W4ZG52EY9fQLbY+zyEslPlwLXS04j9eW9e6B8yP1HnZUmRPgUeNc2yq
hK0W8Z9H8yBQp0sIMYSrwAYjJyn86aZ8oRqnANn2+HTGRZrRLNojYhtB4mdFINQC
7aSCnKU/oM0DbycGHTeJUHMw06EDVv1NJP+YubdS7UrfHxTmup24aHSIM9/3m0ud
QaByaDn8MWvnZApprjaQ2/Qd0f3Txlbljj5CPze/MGxLHwJQ5ZxET5TtRm0V5GYr
XVd7PnKcdqMO4iv6ZT4P55xcMEU/mpNupelbRv3mKNssICYdGw2yy+JbH2x3QtN3
f7KQzQ55c8ntBsaYmzO/gfl/PM2zfrnvay/a3OH8TkV1mwrTuMItgOivmVUwSoaX
rB64FnJ8gb02wxwYr/607a4bY06lpafE7twlbp94pn8wjPKq1D4rAHG7f9ytC3ea
MrVDBNN/BgvzdtAQqppoY1zgp8rFK7vxYlq4qAHpOF4L71//vpJwClYDrTw/MVyA
LI/xaA2e4h0TBWwEnDrx
=tS5B
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 04 Jan 2015 07:33:21 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jul 1 14:51:29 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.