Package: dealer
Version: 0.20040530-4
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 -o dealer dealer.o defs.o pbn.o c4.o getopt.o pointcount.o -L./Random 
-lgnurand -Wl,-z,relro
dealer.o: In function `true_dd':
/srv/jenkins-slave/workspace/sid-goto-cc-dealer/dealer-0.20040530/dealer.c:331: 
warning: the use of `tmpnam' is dangerous, better use `mkstemp'

error: conflicting function declarations "mycalloc"
old definition in module dealer file dealer.c line 390
char * (unsigned int nel, unsigned int siz)
new definition in module defs file defs.y line 23
void * (signed int, unsigned long int)
Makefile:24: recipe for target 'dealer' failed
make[1]: *** [dealer] Error 64
make[1]: Leaving directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-dealer/dealer-0.20040530'
debian/rules:27: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 2

While the signedness difference on parameter nel would be good to fix as well,
difference on the siz parameter will necessarily cause undefined behaviour for
all platforms with sizeof(unsigned)<sizeof(unsigned long): either the value will
be truncated in an arbitrary way, or the wrong set of bytes will be picked up
(in particular on big endian systems).

Adjusting the declaration in defs.y should fix these problems, assuming no
truncation can occur.

Best,
Michael

Attachment: pgpz2w1KTF_a2.pgp
Description: PGP signature

Reply via email to