[Pyrex] Mem problem.

Francesc Altet faltet at carabos.com
Mon Oct 16 10:31:19 UTC 2006


Hola Pere,

El dl 16 de 10 del 2006 a les 11:52 +0200, en/na Pere Urbón Bayes va
escriure:
> Dear pyrex community, my name is Pere and I'm porting an internal lib to
>  python via pyrex. I could port a little part ( the simple case ) but
> when I try to do it with the large case it doesn't work. When I run with
> the large case I get all the time this error:
> 
> purbon at ccd-purbon:~/workspace/ubc/PyUBC$ ./test.py
> 1024
> <type 'list'>
> *** glibc detected *** free(): invalid next size (normal): 0x081567a0 ***
> Avortat

If your problem is reproducible, that's good news :-)

[snip]
> and the source code involved with pyrex is:
> 
> if wordLength <= UnsignedIntLength:
> 	#We are working with an small code
> 	smallCode=small_kernel(p,wordLength,codeCardinal,...)
> 	codi = scCode2pCode(smallCode,codeCardinal,limbs)
> else:
> 	#Our code is on the large side.
> 	largeCode = large_kernel(p,wordLength,codeCardinal,...)
> 	codi = lcCode2pCode(largeCode,codeCardinal,limbs)
> 	
> return codi
> 
> if i take out the large_kernel function then the case works good ...
> this could make me supose that the problem could be with the lib, but if
>  i run the binary generated with the lib it run without problems.

Mmm, I'd say that with so little clues it is going to be difficult to
help you. Please, whenever you submmit a problem to a list, try to
isolate the issue as much as you can and try to describe it with detail.
Ultimately, providing a small piece of code reproducing your problem is
the best thing so as to allow other people helping you.

Cheers,

-- 
>0,0<   Francesc Altet   | "Be careful about using the following code --
V   V   Carabos Coop. V. |  I've only proven that it works, 
 "-"    Enjoy Data       |  I haven't tested it." -- Donald Knuth






More information about the Pyrex mailing list