File: _sphinx3module.c
Function: sphinx3_get_hypothesis
Error: ob_refcnt of '*hypseg_obj' is 1 too high
190 static PyObject *
191 sphinx3_get_hypothesis(PyObject *self, PyObject *args)
192 {
193 	PyObject *hypstr_obj, *hypseg_obj;
194 	hyp_t **hypsegs, **h;
195 	char *hypstr, *uttid;
196 	int nhyps, i, allphone;
197 
198 	s3_decode_hypothesis(&decoder, &uttid, &hypstr, &hypsegs);
199 	nhyps = 0;
200 	for (h = hypsegs; *h; ++h)
when treating unknown struct hyp_t * * * from _sphinx3module.c:198 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:200 as non-NULL
taking True path
when treating unknown struct hyp_t * from _sphinx3module.c:200 as NULL
taking False path
201 		++nhyps;
202 
203 	allphone = (cmd_ln_int32("-op_mode") == 1);
when considering range: -0x80000000 <= value <= 0
204 
205 	hypstr_obj = PyString_FromString(hypstr);
when treating unknown char * * from _sphinx3module.c:198 as non-NULL
when PyString_FromString() fails
206 	hypseg_obj = PyTuple_New(nhyps);
when PyTuple_New() succeeds
PyTupleObject allocated at: 	hypseg_obj = PyTuple_New(nhyps);
ob_refcnt is now refs: 1 + N where N >= 0
207 	for (i = 0; i < nhyps; ++i) {
taking True path
taking False path
208 		PyObject *seg_obj;
209 		const char *wordstr;
210 
211 		/* hyp_t is BOGUS, it should have a string, then we
212 		 * wouldn't have to screw around like this for
213 		 * allphones. */
214 		if (allphone) {
taking False path
215 			wordstr = mdef_ciphone_str(kbcore_mdef(decoder.kbcore),
216 						   hypsegs[i]->id);
217 		}
218 		else {
219 			wordstr = dict_wordstr(kbcore_dict(decoder.kbcore),
when treating unknown struct kbcore_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct dict_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct dictword_t * from _sphinx3module.c:219 as non-NULL
220 					       hypsegs[i]->id);
221 		}
222 		seg_obj = Py_BuildValue("(siiii)",
when treating unknown struct hyp_t * from _sphinx3module.c:227 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:226 as non-NULL
when Py_BuildValue() succeeds
223 					wordstr,
224 					hypsegs[i]->sf,
when treating unknown struct hyp_t * from _sphinx3module.c:224 as non-NULL
225 					hypsegs[i]->ef,
when treating unknown struct hyp_t * from _sphinx3module.c:225 as non-NULL
226 					hypsegs[i]->ascr,
227 					hypsegs[i]->lscr);
228 		PyTuple_SET_ITEM(hypseg_obj, i, seg_obj);
229 	}
230 
231 	return Py_BuildValue("(OO)", hypstr_obj, hypseg_obj);
when Py_BuildValue() fails
returning
ob_refcnt of '*hypseg_obj' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 5 similar trace(s) to this
232 }

File: _sphinx3module.c
Function: sphinx3_get_hypothesis
Error: ob_refcnt of '*hypstr_obj' is 1 too high
190 static PyObject *
191 sphinx3_get_hypothesis(PyObject *self, PyObject *args)
192 {
193 	PyObject *hypstr_obj, *hypseg_obj;
194 	hyp_t **hypsegs, **h;
195 	char *hypstr, *uttid;
196 	int nhyps, i, allphone;
197 
198 	s3_decode_hypothesis(&decoder, &uttid, &hypstr, &hypsegs);
199 	nhyps = 0;
200 	for (h = hypsegs; *h; ++h)
when treating unknown struct hyp_t * * * from _sphinx3module.c:198 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:200 as non-NULL
taking True path
when treating unknown struct hyp_t * from _sphinx3module.c:200 as NULL
taking False path
201 		++nhyps;
202 
203 	allphone = (cmd_ln_int32("-op_mode") == 1);
when considering range: -0x80000000 <= value <= 0
204 
205 	hypstr_obj = PyString_FromString(hypstr);
when treating unknown char * * from _sphinx3module.c:198 as non-NULL
when PyString_FromString() succeeds
PyStringObject allocated at: 	hypstr_obj = PyString_FromString(hypstr);
ob_refcnt is now refs: 1 + N where N >= 0
206 	hypseg_obj = PyTuple_New(nhyps);
when PyTuple_New() succeeds
207 	for (i = 0; i < nhyps; ++i) {
taking True path
taking False path
208 		PyObject *seg_obj;
209 		const char *wordstr;
210 
211 		/* hyp_t is BOGUS, it should have a string, then we
212 		 * wouldn't have to screw around like this for
213 		 * allphones. */
214 		if (allphone) {
taking False path
215 			wordstr = mdef_ciphone_str(kbcore_mdef(decoder.kbcore),
216 						   hypsegs[i]->id);
217 		}
218 		else {
219 			wordstr = dict_wordstr(kbcore_dict(decoder.kbcore),
when treating unknown struct kbcore_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct dict_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct dictword_t * from _sphinx3module.c:219 as non-NULL
220 					       hypsegs[i]->id);
221 		}
222 		seg_obj = Py_BuildValue("(siiii)",
when treating unknown struct hyp_t * from _sphinx3module.c:227 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:226 as non-NULL
when Py_BuildValue() succeeds
223 					wordstr,
224 					hypsegs[i]->sf,
when treating unknown struct hyp_t * from _sphinx3module.c:224 as non-NULL
225 					hypsegs[i]->ef,
when treating unknown struct hyp_t * from _sphinx3module.c:225 as non-NULL
226 					hypsegs[i]->ascr,
227 					hypsegs[i]->lscr);
228 		PyTuple_SET_ITEM(hypseg_obj, i, seg_obj);
229 	}
230 
231 	return Py_BuildValue("(OO)", hypstr_obj, hypseg_obj);
when Py_BuildValue() succeeds
returning
ob_refcnt of '*hypstr_obj' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 3 similar trace(s) to this
ob_refcnt is now refs: 1 + N where N >= 1
232 }

File: _sphinx3module.c
Function: sphinx3_get_hypothesis
Error: dereferencing NULL (MEM[(struct PyTupleObject *)hypseg_obj].ob_item) at _sphinx3module.c:207
190 static PyObject *
191 sphinx3_get_hypothesis(PyObject *self, PyObject *args)
192 {
193 	PyObject *hypstr_obj, *hypseg_obj;
194 	hyp_t **hypsegs, **h;
195 	char *hypstr, *uttid;
196 	int nhyps, i, allphone;
197 
198 	s3_decode_hypothesis(&decoder, &uttid, &hypstr, &hypsegs);
199 	nhyps = 0;
200 	for (h = hypsegs; *h; ++h)
when treating unknown struct hyp_t * * * from _sphinx3module.c:198 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:200 as non-NULL
taking True path
when treating unknown struct hyp_t * from _sphinx3module.c:200 as NULL
taking False path
201 		++nhyps;
202 
203 	allphone = (cmd_ln_int32("-op_mode") == 1);
when considering range: -0x80000000 <= value <= 0
204 
205 	hypstr_obj = PyString_FromString(hypstr);
when treating unknown char * * from _sphinx3module.c:198 as non-NULL
when PyString_FromString() succeeds
206 	hypseg_obj = PyTuple_New(nhyps);
when PyTuple_New() fails
207 	for (i = 0; i < nhyps; ++i) {
taking True path
208 		PyObject *seg_obj;
209 		const char *wordstr;
210 
211 		/* hyp_t is BOGUS, it should have a string, then we
212 		 * wouldn't have to screw around like this for
213 		 * allphones. */
214 		if (allphone) {
taking False path
215 			wordstr = mdef_ciphone_str(kbcore_mdef(decoder.kbcore),
216 						   hypsegs[i]->id);
217 		}
218 		else {
219 			wordstr = dict_wordstr(kbcore_dict(decoder.kbcore),
when treating unknown struct kbcore_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct dict_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:219 as non-NULL
when treating unknown struct dictword_t * from _sphinx3module.c:219 as non-NULL
220 					       hypsegs[i]->id);
221 		}
222 		seg_obj = Py_BuildValue("(siiii)",
when treating unknown struct hyp_t * from _sphinx3module.c:227 as non-NULL
when treating unknown struct hyp_t * from _sphinx3module.c:226 as non-NULL
when Py_BuildValue() succeeds
223 					wordstr,
224 					hypsegs[i]->sf,
when treating unknown struct hyp_t * from _sphinx3module.c:224 as non-NULL
225 					hypsegs[i]->ef,
when treating unknown struct hyp_t * from _sphinx3module.c:225 as non-NULL
226 					hypsegs[i]->ascr,
227 					hypsegs[i]->lscr);
228 		PyTuple_SET_ITEM(hypseg_obj, i, seg_obj);
dereferencing NULL (MEM[(struct PyTupleObject *)hypseg_obj].ob_item) at _sphinx3module.c:207
found 1 similar trace(s) to this
229 	}
230 
231 	return Py_BuildValue("(OO)", hypstr_obj, hypseg_obj);
232 }