execution problem - diskUtility.c - ARM CPU

54 views
Skip to first unread message

first name surname

unread,
Apr 28, 2024, 1:06:32 PM4/28/24
to XOS Users
Hello, 
I came across a bug when being unable to load an exec file with the xfs-interface. 

After debugging I realised the code enters a loop when executing the  loadExecutableToDisk function in the diskUtility.c file. at line 727.

I am running eXpOS from within a Docker container on a ARM CPU and, following a previous conversation with Cliford regarding a bug compiling spl code and the modification he had made in this commit, I modified the code locally in the function at line 698 to declare the variable 'c' as an int rather than a char, which seems to resolve the issue.

I was not sure if I could create a PR on your repo so I thought of sending you this message to make you aware of the situation. 
Have a good day.


first name surname

unread,
Apr 28, 2024, 3:59:59 PM4/28/24
to XOS Users
erratum : 
I also found that, instead of changing the declaration of 'c' to an int it is possible to keep the declaration as a char when using the feof() function as such : 
while (!feof(fileToBeLoaded))
{
c = fgetc(fileToBeLoaded);
if (c == '\n' || c == EOF)
num_of_lines++;
}

now sure if it is helpful but thought I'd mention it.

C M MADHAV PRABHU

unread,
Apr 29, 2024, 1:11:32 AM4/29/24
to XOS Users
Hi,

Thanks for finding out this bug, could you put a pull request in the xfs-interface repository? We will test and merge as soon as possible. Also, were you running an apple silicon machine or a generic ARM GNU/Linux distro?

This can be reproduced with just a `load --exec ./test.xsm` right?

first name surname

unread,
Apr 29, 2024, 8:20:23 AM4/29/24
to XOS Users

hello, 
yes that's right, this can be reproduced with the command you mention, this is on an Apple Silicon machine.
I will send the pull request with the new code. 
Have a good day.

first name surname

unread,
May 9, 2024, 10:11:56 PM5/9/24
to XOS Users
Hello, 

I tried to push the corrected code to a new branch to fix the problem mentioned above, but I am getting a permission denied error when pushing the xfs-interface repository 
(remote: Permission to eXpOSNitc/xfs-interface.git denied to coder-daddys-hub.)

I cloned the repo, created a new branch and pushed the branch to origin. 
Do i need to be granted permissions to push to your repository? Or else, what is the  method to follow to push new code on your repos?
my github username is : coder-daddys-hub
thanks 

first name surname

unread,
May 9, 2024, 10:34:58 PM5/9/24
to XOS Users
nevermind, github newbie mistake. 
I forked the repo and creaated a pull request with the modification. 

have a good day. :)

Reply all
Reply to author
Forward
0 new messages