Package: avra
Version: 1.3.0-1
Usertags: goto-cc

During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and 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.

[...]
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" 
-DPACKAGE=\"avra\" -DVERSION=\"1.3\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 
-DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 
-DHAVE_STRSTR=1 -I.   -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector 
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -c -o stdextra.o 
stdextra.c
gcc  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Werror=format-security  -Wl,-z,relro -o avra avra.o args.o coff.o device.o 
directiv.o expr.o file.o macro.o map.o mnemonic.o parser.o stdextra.o  

error: conflicting function declarations "nocase_strcmp"
old definition in module avra file avra.h line 350
char * (char *, char *)
new definition in module stdextra file stdextra.c line 42
signed int (char *s, char *t)
Makefile:344: recipe for target 'avra' failed
make[1]: *** [avra] Error 64
make[1]: Leaving directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-avra/avra-1.3.0/src'
dh_auto_build: make -j1 returned exit code 2
debian/rules:6: recipe for target 'build' failed
make: *** [build] Error 2

For any architecture with sizeof(char*)!=sizeof(int), the result value will have
several undefined bytes. As all calls to nocase_strcmp just do an is-zero
comparison, the branch decisions will be arbitrary.

The fix, however, is trivial: change the return value of nocase_strcmp (and also
nocase_strncmp) to int in avra.h:

http://sources.debian.net/src/avra/1.3.0-1/src/avra.h?hl=350#L350

Best,
Michael

Attachment: pgpQzMKwBioni.pgp
Description: PGP signature

Reply via email to