[Cython] possible problems with temp allocation?

Lisandro Dalcin dalcinl at gmail.com
Mon Feb 2 21:28:06 CET 2009


See the attached pyx file.

A valgrind run points me to the line where you have
"__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;" basically, DECREF is being
called with __pyx_t_1 being NULL...


  /* "/u/dalcinl/tmp/foo.pyx":10
 *         out = numpy.asarray(out)
 *         out.flat[:] = array
 *     return out             # <<<<<<<<<<<<<<
 *
 *
 */
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.pyx
Type: application/octet-stream
Size: 319 bytes
Desc: not available
Url : http://codespeak.net/pipermail/cython-dev/attachments/20090202/71442e89/attachment.obj 


More information about the Cython-dev mailing list