fuseiso loops parsing options on aarch64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fuseiso (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
On ARM64 (aarch64) fuseiso does not work. It loops forever. Tracing shows looping with getopt, so parsing command line options.
To reproduse - on aarch64 - just type fuseiso, no need to bother with options. See that it does nothing (visible), just stays there. With top one can see one CPU going to 100%
I reported patch to the original developer but it seems fuseiso is not maintained since 2007.
https:/
The loop happens because getopt returns -1 (no more options) which is assigned to a char. Type char on arm64 is always unsigned, so the test for ">0" will always be true. The loop thinks it has more options to parse resulting in an infinite cycle.
Fix simply changes the type of lvalue from char to int.
Patch is attached. With it fuseison on arm64 works as on x86.
Thank you,
Dan.
The attachment "0001-Fix- infinite- loop-parsing- line-options- on-arm64. patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]