gbutils ARM bug (programs freezes)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gbutils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Dear gbutils developers,
Thank you very much for such excellent set of tools!
I would like to supply a bug in ARM architecture. I found the bug in gblreg program, but I think, that it affects all the utils.
Step to reproduce:
Ubuntu 16.04 ARM. Run gblreg program on any dataset with any options (except -h) and the program hangs.
The origin of the bug:
ARM architecture, by default treat char as unsigned variable, so loop
while((
will be infinite as EOF is -1 and opt is not negative value by the definition.
Possible solution.
1) add -fsigned-char option to compiler. The easiest way, but can affect the rest of the code possibly creates new bugs.
2) Change char opt to signed char opt.
3) The best way from my point of view is to change char opt to int, as getopt function returns native.
Sincerely yours,
Kirill Okhotnikov.
Hi Kirill,
thanks for the report. I think I will follow your suggestion and prepare an updated version soon.
Best,
Giulio.