bugGNU Astronomy Utilities - Bugs: bug #51467, Inproper types for function code


You are not allowed to post comments on this tracker with your current authentication level.

bug #51467: Inproper types for function code

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Fri 14 Jul 2017 05:31:16 PM UTC
Category:  MakeProfiles Severity:  3 - Normal
Item Group:  Crash Status:  Fixed
Privacy:  Public Assigned to:  makhlaghi
Open/Closed:  Closed

Fri 14 Jul 2017 05:56:37 PM UTC, comment #1: 

The fix has been applied and pushed to the main repo.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Fri 14 Jul 2017 05:31:16 PM UTC, original submission:  

Gnuastro 0.3.23 fails on big-endian systems in the  Debian builds (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.

Mohammad Akhlaghi <makhlaghi>
Group administrator


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

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-14 makhlaghi StatusIn Progress Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code