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

Submitted by:  Mohammad Akhlaghi <makhlaghi>
Submitted on:  Fri 14 Jul 2017 05:31:16 PM UTC  
 
Category:  MakeProfiles Severity:  3 - Normal
Item Group:  Crash Status:  Fixed
Privacy:  Public Assigned to:  Mohammad Akhlaghi <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>
Project AdministratorIn charge of this item.
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:

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>
Project AdministratorIn charge of this item.

 

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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    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.3