gnuastro-devel
[Top][All Lists]
Advanced

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

[gnuastro-devel] [bug #51467] Inproper types for function code


From: Mohammad Akhlaghi
Subject: [gnuastro-devel] [bug #51467] Inproper types for function code
Date: Fri, 14 Jul 2017 13:31:17 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

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

                 Summary: Inproper types for function code
                 Project: GNU Astronomy Utilities
            Submitted by: makhlaghi
            Submitted on: Fri 14 Jul 2017 07:31:16 PM CEST
                Category: MakeProfiles
                Severity: 3 - Normal
              Item Group: Crash
                  Status: In Progress
                 Privacy: Public
             Assigned to: makhlaghi
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Gnuastro 0.3.23 fails on big-endian systems in the  Debian builds
<https://buildd.debian.org/status/package.php?p=gnuastro> (you can click on
the red "Build attempted" signs to see the log of the whole build. This is the
error:


/<<PKGBUILDDIR>>/bin/mkprof/.libs/astmkprof: ../tests/mkprof/mkprofcat2.txt:
table row 1, the function code is 0. It should be >0 and <7. Please run again
with `--help' and check the acceptable codes.


The function code in `mkprofcat2.txt' is `1', not `0' (as the error message
says).

I was able to track down the problem: we are treating the function codes as an
8-bit integers in some places, and 32-bit integers in others. Since there is
only 6 profiles currently (profile codes between 1 and 7), only the smallest
byte was only necessary. 

On little-endian systems (most commonly used systems including mine), the
smallest byte is placed first, so reading a 32-bit integer as an 8-bit integer
worked successfully and there was no problem. But on big-endian systems, only
the last byte is filled and so the first byte will be read as 0.

I am busy fixing this now.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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