[Debian-med-packaging] Bug#748305: Unchecked conversion from double to enum
Michael Tautschnig
mt at debian.org
Thu May 15 22:40:33 UTC 2014
Package: genometools
Version: 1.5.1-3
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.
[...]
[compile encseq_lua.o]
file src/gtlua/encseq_lua.c line 83 function encseq_reader_lua_reinit_with_readmode: in expression `luaL_checknumber(L, 3)':
conversion from `double' to `int': implicit conversion not permitted
CONVERSION ERROR
make[2]: *** [obj/src/gtlua/encseq_lua.o] Error 64
make[2]: Leaving directory `/srv/jenkins-slave/workspace/sid-goto-cc-genometools/genometools-1.5.1'
Indeed reviewing the code here
http://sources.debian.net/src/genometools/1.5.1-3/src/gtlua/encseq_lua.c?hl=83#L83
and taking into account the definition of luaL_checknumber on the one hand and
GtReadmode on the other:
http://sources.debian.net/src/genometools/1.5.1-2/src/external/lua-5.1.5/src/lauxlib.c?hl=176#L176
http://sources.debian.net/src/genometools/1.5.1-2/src/core/readmode_api.h#L23
this conversion appears to be dangerous at best: if a double value is return
that does not result in any of the int values 0, 1, 2, 3 all further code may
break.
Best,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20140515/6c960b30/attachment.sig>
More information about the Debian-med-packaging
mailing list