Package: otp
Version: 1:1.2.1-1
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.

[...]
gcc -O2 -Wall otp.o md5.o random.o -o otp

error: conflicting function declarations "o_random"
old definition in module otp file otp.c line 71
signed long int ()
new definition in module random file random.c line 363
signed int (void)
Makefile:9: recipe for target 'otp' failed
make[1]: *** [otp] Error 64
make[1]: Leaving directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-otp/otp-1.2.1'
debian/rules:19: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 2

For any platform with sizeof(int)<sizeof(long), calls to o_random will yield
partly undefined values. I shall assume that this is not intentional, as the
values wouldn't follow any proper random distribution either. The reason lies in
the following wrong declaration:

http://sources.debian.net/src/otp/1:1.2.1-1/otp.c?hl=71#L71

Thus the use here

http://sources.debian.net/src/otp/1:1.2.1-1/otp.c?hl=169#L169

will have several undefined bits, because o_random is actually implemented as
follows:

http://sources.debian.net/src/otp/1:1.2.1-1/random.c?hl=363#L363

Adjusting the declaration in line 169 of otp.c should fix the problem.

Best,
Michael

Attachment: pgpHaW7Wh72I4.pgp
Description: PGP signature

Reply via email to