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

2020-09-09 Thread Andreas Tille
Control: tags -1 pending

Hi Lennart,

On Tue, Sep 08, 2020 at 07:23:15PM -0400, Lennart Sorensen wrote:
> > 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.

A, thanks a lot.  I was not aware of this but it sounds very sensible
and my guess is that lots of code are affected by the same issue.
 
> So here is a patch that appears to solve the problems in the code.

Thanks a lot

   Andreas.

-- 
http://fam-tille.de



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

2020-09-08 Thread Lennart Sorensen
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
diff -ruN phipack-0.0.20160614/src/fasta.c phipack-0.0.20160614.arm64/src/fasta.c
--- phipack-0.0.20160614/src/fasta.c	2016-06-14 00:18:29.0 -0400
+++ phipack-0.0.20160614.arm64/src/fasta.c	2020-09-08 19:08:06.672390326 -0400
@@ -36,7 +36,7 @@
 void read_sequence_name(FILE *in_file,char *name, int capacity)
 {
   int i=0;
-  char ch='\0';
+  signed char ch='\0';
 
   ch=fgetc(in_file);
   if(ch != '>')
@@ -97,7 +97,7 @@
 {
   int bases_read=0;
   int new_limit;
-  char ch;
+  signed char ch;
   char s[250];
   
   ch=fgetc(in_file);
@@ -175,7 +175,7 @@
   int *seq_counter;
   int i;
  
-  char ch;
+  signed char ch;
 
   int cur_seqs;
   int num_seqs=1,new_num;
diff -ruN phipack-0.0.20160614/src/global.c phipack-0.0.20160614.arm64/src/global.c
--- phipack-0.0.20160614/src/global.c	2016-06-13 22:33:15.0 -0400
+++ phipack-0.0.20160614.arm64/src/global.c	2020-09-08 18:04:48.956444973 -0400
@@ -34,7 +34,7 @@
 const int AA_AMBIG_SIZE =2;
 
 const char GAP[] = {'-'};
-const int GAP_SIZE=2;
+const int GAP_SIZE=1;
 
 cbool memberOf(const char *set, const int num, char ch)
 {
@@ -79,10 +79,10 @@
   switch(alignKind)
 {
 case DNA:
-  return (memberOf(DNA_MISSING,DNA_MISSING_SIZE,ch) || memberOf(DNA_AMBIG,DNA_AMBIG_SIZE,ch));
+  return (memberOf(DNA_MISSING,DNA_MISSING_SIZE,ch) || memberOf(DNA_AMBIG,DNA_AMBIG_SIZE,ch)) ? TRUE : FALSE;
   break;
 case AA:
-  return (memberOf(AA_MISSING,AA_MISSING_SIZE,ch) || memberOf(AA_AMBIG,AA_AMBIG_SIZE,ch));
+  return (memberOf(AA_MISSING,AA_MISSING_SIZE,ch) || memberOf(AA_AMBIG,AA_AMBIG_SIZE,ch)) ? TRUE : FALSE;
   break;
 case OTHER:
   if(ch == GLOBAL_MISSING)
diff -ruN phipack-0.0.20160614/src/main.c phipack-0.0.20160614.arm64/src/main.c
--- phipack-0.0.20160614/src/main.c	2016-06-14 00:18:17.0 -0400
+++ phipack-0.0.20160614.arm64/src/main.c	2020-09-08 19:17:18.230153542 -0400
@@ -71,7 +71,8 @@
 
 void get_params(int argc, char**argv, options *opt) 
 { 
-  char *cur,ch,nextch;
+  char *cur;
+  signed char ch,nextch;
   char temp[MAX_SIZE+1];
   int i;
   cbool inFileFound=FALSE;
diff -ruN phipack-0.0.20160614/src/mem.c phipack-0.0.20160614.arm64/src/mem.c
--- phipack-0.0.20160614/src/mem.c	2016-06-13 22:33:15.0 -0400
+++ phipack-0.0.20160614.arm64/src/mem.c	2020-09-08 19:12:52.415278666 -0400
@@ -96,7 +96,7 @@
 
 char ffclose(FILE *handle)
 {
-  char f;
+  signed char f;
   char s[MAX_SIZE+1];
 
   f=fclose(handle);
diff -ruN phipack-0.0.20160614/src/misc.c phipack-0.0.20160614.arm64/src/misc.c
--- phipack-0.0.20160614/src/misc.c	2016-06-13 22:33:15.0 -0400
+++ phipack-0.0.20160614.arm64/src/misc.c	2020-09-08 19:08:28.352322441 -0400
@@ -46,7 +46,7 @@
 
 char skip_all_space(FILE *in_file)
 {
-  char ch;
+  signed char ch;
   
   ch=fgetc(in_file);
   while((ch != EOF) && isspace(ch))
@@ -61,7 +61,7 @@
 
 char skip_newlines(FILE *in_file)
 {
-  char ch;
+  signed char ch;
   
   ch=fgetc(in_file);
   while((ch != EOF) && (ch == '\n'))
@@ -76,7 +76,7 @@
 
 char skip_non_newline(FILE *in_file)
 {
-  char ch;
+  signed char ch;
   
   ch=fgetc(in_file);
   while((ch != EOF) && (ch != '\n'))
@@ -90,7 +90,7 @@
 
 char skip_non_newline_space(FILE *in_file)
 {
-  char ch;
+  signed char ch;
   
   ch=fgetc(in_file);
   while((ch != EOF) && (ch != '\n') && isspace(ch))
diff -ruN phipack-0.0.20160614/src/phylip.c phipack-0.0.20160614.arm64/src/phylip.c
--- phipack-0.0.20160614/src/phylip.c	2016-06-14 00:18:17.0 -0400
+++ phipack-0.0.20160614.arm64/src/phylip.c	2020-09-08 19:10:06.483985652 -0400
@@ -30,7 +30,7 @@
 void read_strict_name(FILE 

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

2020-09-08 Thread Lennart Sorensen
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.

-- 
Len Sorensen



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

2020-09-08 Thread Andreas Tille
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.

Kind regards

Andreas.

On Fri, Sep 04, 2020 at 09:26:47PM +0200, Paul Gevers wrote:
> Source: phipack
> Version: 0.0.20160614-4
> X-Debbugs-CC: debian...@lists.debian.org
> Severity: serious
> User: debian...@lists.debian.org
> Usertags: fails-always
> 
> Dear maintainer(s),
> 
> You recently added an autopkgtest to your package phipack, great.
> However, it fails on arm64. Currently this failure is blocking the
> migration to testing [1]. Can you please investigate the situation and
> fix it?
> 
> I copied some of the output at the bottom of this report.
> 
> More information about this bug and the reason for filing it can be found on
> https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation
> 
> Paul
> 
> [1] https://qa.debian.org/excuses.php?package=phipack
> 
> https://ci.debian.net/data/autopkgtest/testing/arm64/p/phipack/6611212/log.gz
> 
> autopkgtest [07:17:38]: test run-unit-test: [---
> Run test for functionality ...
> 
> ERROR: Illegal state encountered: �
> 
> Exiting...
> Reading sequence file noro.fasta
> autopkgtest [07:17:38]: test run-unit-test: ---]
> 




> ___
> Debian-med-packaging mailing list
> debian-med-packag...@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-packaging


-- 
http://fam-tille.de



Bug#969552: phipack: arm64 autopkgtest failure: ERROR: Illegal state encountered: �

2020-09-04 Thread Paul Gevers
Source: phipack
Version: 0.0.20160614-4
X-Debbugs-CC: debian...@lists.debian.org
Severity: serious
User: debian...@lists.debian.org
Usertags: fails-always

Dear maintainer(s),

You recently added an autopkgtest to your package phipack, great.
However, it fails on arm64. Currently this failure is blocking the
migration to testing [1]. Can you please investigate the situation and
fix it?

I copied some of the output at the bottom of this report.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=phipack

https://ci.debian.net/data/autopkgtest/testing/arm64/p/phipack/6611212/log.gz

autopkgtest [07:17:38]: test run-unit-test: [---
Run test for functionality ...

ERROR: Illegal state encountered: �

Exiting...
Reading sequence file noro.fasta
autopkgtest [07:17:38]: test run-unit-test: ---]



signature.asc
Description: OpenPGP digital signature