[Debian-med-packaging] Bug#747185: Conflicting return types of function DejaVu_create

Andreas Tille andreas at an3as.eu
Fri May 9 11:10:21 UTC 2014


Hi Guy,

hereby I'd like to forward a problem detected in Debian which occured by
using the clang compiler with more strict type checking than gcc.  I think
this might be interesting for you.  It would be great if you could come
up with a patch since I admit I'm not really sure what the correct fix
for this issue might be.

Kind regards

       Andreas.

On Tue, May 06, 2014 at 10:56:52AM +0200, Michael Tautschnig wrote:
> Package: exonerate
> Version: 2.2.0-6
> Usertags: goto-cc
> 
> During a rebuild of all packages in a clean sid chroot (and cowbuilder+pbuilder)
> the build failed with the following error. Please note that we use our research
> compiler tool-chain (using tools from the cbmc package), which permits extended
> reporting on type inconsistencies at link time.
> 
> error: conflicting function declarations "DejaVu_create"
> old definition in module bsam file ../../src/struct/dejavu.h line 42
> DejaVu *DejaVu_create(gchar *seq, gint len)
> new definition in module dejavu file dejavu.c line 26
> DejaVu *DejaVu_create(gchar *seq, gint len)
> 
> reason for conflict at nil.symbol_list in types listed below (array/array):
> 
> signed int [2048]
> signed int [256]
> 
> This is with the following code in dejavu.h:
> 
> http://sources.debian.net/src/exonerate/2.2.0-6/src/struct/dejavu.h?hl=26,27,28,30,31,32,33,34,35,36#L26
> 
> #ifndef ALPHABET_SIZE
> #define ALPHABET_SIZE (1 << CHAR_BIT)
> #endif /* ALPHABET_SIZE */
> 
> typedef struct {
>        gchar *seq;
>         gint  len;
>         gint *next;
>         gint  symbol_list[ALPHABET_SIZE];
>         gint  symbol_list_len;
> } DejaVu;
> 
> Unfortunately, however, a cruel mix of definitions is used for ALPHABET_SIZE
> throughout the codebase of exonerate:
> 
> http://codesearch.debian.net/search?q=package%3Aexonerate+ALPHABET_SIZE
> 
> Any code relying on the size of the symbol_list array will break as it will
> access invalid memory; accesses to the symbol_list_len element are invalid as
> its offset will be wrong.
> 
> Best,
> Michael
> 



> _______________________________________________
> Debian-med-packaging mailing list
> Debian-med-packaging at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging


-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list