[Debian-med-packaging] Bug#969552: [Help] Re: Bug#969552: phipack: arm64 autopkgtest failure: ERROR: Illegal state encountered: �

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Wed Sep 9 00:23:15 BST 2020


On Tue, Sep 08, 2020 at 05:35:45PM -0400, Lennart Sorensen wrote:
> On Tue, Sep 08, 2020 at 10:35:26PM +0200, Andreas Tille wrote:
> > Control: tags -1 help
> > 
> > Hi Debian Arm team,
> > 
> > I admit I have no idea how to deal with this except by excluding
> > arm64 from the list of supported architectures which is definitely
> > not my prefered way of action.
> > 
> > Any help would be really appreciated.
> 
> I don't have access to an arm64 system at the moment, but a good start
> might be to fix the compiler warnings, such as the array subscript out
> of bounds in global.c line 44.  The rest of the warnings appear harmless.
> 
> It would appear that GAP_SIZE = 2 is wrong given GAP[] only contains a
> single character.

I found the actual problem.  Someone didn't know that there are 3 types
of char in C.  char, signed char and unsigned char.  char is _only_ for
use in strings, and never to be used as a numerical value.  This is due
to the sign of char being implementation specific.  On x86 it is signed,
on arm it is unsigned.  So any time you want to work with numerical
values of a char, you must specify if you want signed or unsigned.
Changing char ch to unsigned char ch, made x86 fail the same way arm64
did, and making it signed char, makes both pass the test.

So here is a patch that appears to solve the problems in the code.

-- 
Len Sorensen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phipack.unsigned.char.fixes.patch
Type: text/x-diff
Size: 5336 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20200908/ff5b6a02/attachment.patch>


More information about the Debian-med-packaging mailing list