gbutils ARM bug (programs freezes)

Bug #1752835 reported by Kirill Okhotnikov
8
This bug affects 1 person
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((opt=getopt_long(argc,argv,"v:hF:M:O:w",gb_long_options, &gb_option_index))!=EOF)
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.

Revision history for this message
Giulio Bottazzi (g1ul10) wrote :

Hi Kirill,
thanks for the report. I think I will follow your suggestion and prepare an updated version soon.

Best,
Giulio.

Revision history for this message
Pietro Battiston (toobaz) wrote :

Version 5.7.1-1, currently in Debian testing. fixes this

Changed in gbutils (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gbutils - 5.7.1-1

---------------
gbutils (5.7.1-1) unstable; urgency=medium

  [ Tomasz Buchert ]
  * d/control: update vcs links to salsa
  * Fix insecure-copyright-format-uri

  [ Pietro Battiston ]
  * New upstream version 5.7.1
    - Fix freeze on ARM (LP: #1752835)

 -- Pietro Battiston <email address hidden> Thu, 08 Mar 2018 08:22:01 +0100

Changed in gbutils (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.