[med-svn] r17003 - in trunk/packages/genometools/trunk/debian: . patches
Sascha Steinbiss
sascha-guest at moszumanska.debian.org
Sat May 24 18:09:23 UTC 2014
Author: sascha-guest
Date: 2014-05-24 18:09:23 +0000 (Sat, 24 May 2014)
New Revision: 17003
Added:
trunk/packages/genometools/trunk/debian/patches/typecheck-fixes
Modified:
trunk/packages/genometools/trunk/debian/changelog
trunk/packages/genometools/trunk/debian/patches/series
Log:
Address type conversion issues raised in #748305
Modified: trunk/packages/genometools/trunk/debian/changelog
===================================================================
--- trunk/packages/genometools/trunk/debian/changelog 2014-05-24 13:35:18 UTC (rev 17002)
+++ trunk/packages/genometools/trunk/debian/changelog 2014-05-24 18:09:23 UTC (rev 17003)
@@ -1,3 +1,11 @@
+genometools (1.5.2-4) unstable; urgency=low
+
+ * Incorporate patches addressing type conversion errors (thanks to
+ Michael Tautschnig).
+ Closes: #748305
+
+ -- Sascha Steinbiss <steinbiss at zbh.uni-hamburg.de> Sat, 24 May 2014 18:57:45 +0000
+
genometools (1.5.2-3) unstable; urgency=low
* Address building issues on s390x, powerpc and armhf
Modified: trunk/packages/genometools/trunk/debian/patches/series
===================================================================
--- trunk/packages/genometools/trunk/debian/patches/series 2014-05-24 13:35:18 UTC (rev 17002)
+++ trunk/packages/genometools/trunk/debian/patches/series 2014-05-24 18:09:23 UTC (rev 17003)
@@ -10,3 +10,4 @@
spelling
split-manuals
arm64-no-m64
+typecheck-fixes
Added: trunk/packages/genometools/trunk/debian/patches/typecheck-fixes
===================================================================
--- trunk/packages/genometools/trunk/debian/patches/typecheck-fixes (rev 0)
+++ trunk/packages/genometools/trunk/debian/patches/typecheck-fixes 2014-05-24 18:09:23 UTC (rev 17003)
@@ -0,0 +1,224 @@
+Description: Type conversion problem fixes.
+Author: Sascha Steinbiss <steinbiss at zbh.uni-hamburg.de>
+--- a/src/gtlua/encseq_lua.c
++++ b/src/gtlua/encseq_lua.c
+@@ -80,8 +80,10 @@
+ GtReadmode readmode;
+ reader = check_encseq_reader(L, 1);
+ encseq = check_encseq(L, 2);
+- readmode = luaL_checknumber(L, 3);
+- startpos = luaL_checknumber(L, 4);
++ readmode = luaL_checklong(L, 3);
++ startpos = luaL_checklong(L, 4);
++ luaL_argcheck(L, readmode <= 3, 3,
++ "invalid readmode value, must be <= 3");
+ luaL_argcheck(L, startpos < gt_encseq_total_length(*encseq), 4,
+ "cannot exceed total length of encoded sequence");
+ gt_encseq_reader_reinit_with_readmode(*reader, *encseq, readmode, startpos);
+@@ -113,10 +115,12 @@
+ int readmode;
+ unsigned char cc;
+ encseq = check_encseq(L, 1);
+- pos = luaL_checknumber(L, 2);
+- readmode = luaL_checknumber(L, 3);
++ pos = luaL_checklong(L, 2);
++ readmode = luaL_checklong(L, 3);
+ luaL_argcheck(L, pos < gt_encseq_total_length(*encseq), 2,
+ "cannot exceed total length of encoded sequence");
++ luaL_argcheck(L, readmode <= 3, 3,
++ "invalid readmode value, must be <= 3");
+ cc = gt_encseq_get_encoded_char(*encseq, pos, readmode);
+ lua_pushnumber(L, cc);
+ return 1;
+@@ -129,10 +133,12 @@
+ int readmode;
+ char cc;
+ encseq = check_encseq(L, 1);
+- pos = luaL_checknumber(L, 2);
+- readmode = luaL_checknumber(L, 3);
++ pos = luaL_checklong(L, 2);
++ readmode = luaL_checklong(L, 3);
+ luaL_argcheck(L, pos < gt_encseq_total_length(*encseq), 2,
+ "cannot exceed total length of encoded sequence");
++ luaL_argcheck(L, readmode <= 3, 3,
++ "invalid readmode value, must be <= 3");
+ cc = gt_encseq_get_decoded_char(*encseq, pos, readmode);
+ lua_pushlstring(L, &cc, sizeof (char));
+ return 1;
+@@ -192,8 +198,8 @@
+ GtUword from, to;
+ unsigned char *string;
+ encseq = check_encseq(L, 1);
+- from = luaL_checknumber(L, 2);
+- to = luaL_checknumber(L, 3);
++ from = luaL_checklong(L, 2);
++ to = luaL_checklong(L, 3);
+ luaL_argcheck(L, from <= to, 2, "must be <= range endposition");
+ luaL_argcheck(L, to < gt_encseq_total_length(*encseq), 3,
+ "cannot exceed total length of encoded sequence");
+@@ -209,8 +215,8 @@
+ GtUword from, to;
+ char *string;
+ encseq = check_encseq(L, 1);
+- from = luaL_checknumber(L, 2);
+- to = luaL_checknumber(L, 3);
++ from = luaL_checklong(L, 2);
++ to = luaL_checklong(L, 3);
+ luaL_argcheck(L, from <= to, 2, "must be <= range endposition");
+ luaL_argcheck(L, to < gt_encseq_total_length(*encseq), 3,
+ "cannot exceed total length of encoded sequence");
+@@ -226,7 +232,7 @@
+ GtEncseq **encseq;
+ GtUword pos;
+ encseq = check_encseq(L, 1);
+- pos = luaL_checknumber(L, 2);
++ pos = luaL_checklong(L, 2);
+ luaL_argcheck(L, pos < gt_encseq_num_of_sequences(*encseq), 2,
+ "cannot exceed number of sequences");
+ lua_pushnumber(L, gt_encseq_seqlength(*encseq, pos));
+@@ -238,7 +244,7 @@
+ GtEncseq **encseq;
+ GtUword pos;
+ encseq = check_encseq(L, 1);
+- pos = luaL_checknumber(L, 2);
++ pos = luaL_checklong(L, 2);
+ luaL_argcheck(L, pos < gt_encseq_num_of_sequences(*encseq), 2,
+ "cannot exceed number of sequences");
+ lua_pushnumber(L, gt_encseq_seqstartpos(*encseq, pos));
+@@ -250,7 +256,7 @@
+ GtEncseq **encseq;
+ GtUword pos;
+ encseq = check_encseq(L, 1);
+- pos = luaL_checknumber(L, 2);
++ pos = luaL_checklong(L, 2);
+ luaL_argcheck(L, pos < gt_encseq_total_length(*encseq), 2,
+ "cannot exceed total length of encoded sequence");
+ lua_pushnumber(L, gt_encseq_seqnum(*encseq, pos));
+@@ -279,7 +285,7 @@
+ GtUword seqno, desclen;
+ const char *string;
+ encseq = check_encseq(L, 1);
+- seqno = luaL_checknumber(L, 2);
++ seqno = luaL_checklong(L, 2);
+ luaL_argcheck(L, seqno < gt_encseq_num_of_sequences(*encseq), 2,
+ "cannot exceed number of sequences");
+ string = gt_encseq_description(*encseq, &desclen, seqno);
+@@ -300,7 +306,7 @@
+ GtEncseq **encseq;
+ GtUword fileno;
+ encseq = check_encseq(L, 1);
+- fileno = luaL_checknumber(L, 2);
++ fileno = luaL_checklong(L, 2);
+ luaL_argcheck(L, fileno < gt_encseq_num_of_files(*encseq), 2,
+ "cannot exceed number of files");
+ lua_pushnumber(L, gt_encseq_effective_filelength(*encseq, fileno));
+@@ -312,7 +318,7 @@
+ GtEncseq **encseq;
+ GtUword fileno;
+ encseq = check_encseq(L, 1);
+- fileno = luaL_checknumber(L, 2);
++ fileno = luaL_checklong(L, 2);
+ luaL_argcheck(L, fileno < gt_encseq_num_of_files(*encseq), 2,
+ "cannot exceed number of files");
+ lua_pushnumber(L, gt_encseq_filestartpos(*encseq, fileno));
+@@ -324,7 +330,7 @@
+ GtEncseq **encseq;
+ GtUword pos;
+ encseq = check_encseq(L, 1);
+- pos = luaL_checknumber(L, 2);
++ pos = luaL_checklong(L, 2);
+ luaL_argcheck(L, pos < gt_encseq_total_length(*encseq), 2,
+ "cannot exceed total length of encoded sequence");
+ lua_pushnumber(L, gt_encseq_filenum(*encseq, pos));
+@@ -397,8 +403,10 @@
+ GtUword startpos;
+ GtReadmode readmode;
+ encseq = check_encseq(L, 1);
+- readmode = luaL_checknumber(L, 2);
+- startpos = luaL_checknumber(L, 3);
++ readmode = luaL_checklong(L, 2);
++ startpos = luaL_checklong(L, 3);
++ luaL_argcheck(L, readmode <= 3, 2,
++ "invalid readmode value, must be <= 3");
+ luaL_argcheck(L, startpos < gt_encseq_total_length(*encseq), 3,
+ "cannot exceed total length of encoded sequence");
+ reader = gt_encseq_create_reader_with_readmode(*encseq, readmode, startpos);
+--- a/src/gtlua/mathsupport_lua.c
++++ b/src/gtlua/mathsupport_lua.c
+@@ -21,7 +21,7 @@
+
+ static int gt_lua_mathsupport_rand_max(lua_State *L)
+ {
+- GtUword max = luaL_checknumber(L, 1);
++ GtUword max = luaL_checklong(L, 1);
+
+ lua_pushnumber(L, gt_rand_max(max));
+ return 1;
+--- a/src/match/eis-bwtseq.c
++++ b/src/match/eis-bwtseq.c
+@@ -473,7 +473,7 @@
+ CONTEXT_INTERVAL = 128,
+ };
+
+-int
++enum verifyBWTSeqErrCode
+ gt_BWTSeqVerifyIntegrity(BWTSeq *bwtSeq, const char *projectName,
+ int checkFlags,
+ GtUword tickPrint, FILE *fp,
+--- a/src/tools/gt_tir.c
++++ b/src/tools/gt_tir.c
+@@ -394,9 +394,9 @@
+ GtNodeVisitor *pdom_v;
+ ms = gt_pdom_model_set_new(arguments->hmm_files, err);
+ if (ms != NULL) {
+- pdom_v = gt_ltrdigest_pdom_visitor_new(ms, arguments->cutoff,
++ pdom_v = gt_ltrdigest_pdom_visitor_new(ms, arguments->evalue_cutoff,
+ arguments->chain_max_gap_length,
+- arguments->evalue_cutoff, rmap,
++ arguments->cutoff, rmap,
+ err);
+ if (pdom_v == NULL)
+ had_err = -1;
+--- a/testdata/gtscripts/encseq.lua
++++ b/testdata/gtscripts/encseq.lua
+@@ -60,6 +60,9 @@
+ rval, err = pcall(GenomeTools_encseq.get_encoded_char, es, 100, 0)
+ assert(not rval)
+ assert(string.find(err, "cannot exceed"))
++ rval, err = pcall(GenomeTools_encseq.get_encoded_char, es, 10, 6)
++ assert(not rval)
++ assert(string.find(err, "invalid readmode"))
+ end
+
+ function run_test_seq_startpos(es)
+@@ -99,6 +102,9 @@
+ rval, err = pcall(GenomeTools_encseq.seqlength, es, 2)
+ assert(not rval)
+ assert(string.find(err, "cannot exceed"))
++ rval, err = pcall(GenomeTools_encseq.get_encoded_char, es, 10, 6)
++ assert(not rval)
++ assert(string.find(err, "invalid readmode"))
+ end
+
+ function run_test_file_length_protein(es)
+@@ -128,7 +134,7 @@
+ rval, err = pcall(GenomeTools_encseq.extract_encoded, es, 300, 500)
+ assert(not rval)
+ assert(string.find(err, "cannot exceed"))
+-
++
+ end
+
+ function run_test_seq_substr_decoded(es, seq1, seq2)
+@@ -168,7 +174,10 @@
+ rval, err = pcall(GenomeTools_encseq.create_reader_with_readmode, es, 0, 300)
+ assert(not rval)
+ assert(string.find(err, "cannot exceed"))
+-end
++ rval, err = pcall(GenomeTools_encseq.create_reader_with_readmode, es, 7, 3)
++ assert(not rval)
++ assert(string.find(err, "invalid readmode"))
++end
+
+ ee = gt.encseq_encoder_new()
+ ee:encode({dnaseqfile}, "dnaseqfile")
More information about the debian-med-commit
mailing list