[Numpy-discussion] numpy segv on OpenBSD (original) (raw)

David M. Cooke cookedm at physics.mcmaster.ca
Thu Jun 15 01:44:54 EDT 2006


On Thu, 15 Jun 2006 15:22:57 +1000 (EST) Damien Miller <djm at mindrot.org> wrote:

Hi,

I'm trying to make an OpenBSD package on numpy-0.9.5, but it receives a malloc fault in the checktypes() self-test as it tries to free() a junk pointer. In case you are not aware, OpenBSD's malloc() implementation does a fair bit of randomisation that makes it (deliberately) sensitive to memory management errors. Instumenting the checktypes test and scalartypes.inc.src's gendealloc() and genalloc() functions I noticed that the error occurs up after calling gendealloc() on a complex128scalar that was created as checktypes's "valb" variable as it is GC'd. The checktypes tests work fine on the complex64scalar type and all the other preceeding types. I'm not familiar with the guts of numpy at all (and I can't even find the declaration of the complex128scalar type in the source). What difference between complex64scalar and complex128scalar should I look for to debug this further?

Can you update to the latest svn? We may have fixed it already: valgrind is showing up nothing for me.

A complex128scalar is a complex number made up of doubles (float64); a complex64 is one of floats (float32).

-- |>|/|< /--------------------------------------------------------------------------
|David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm at physics.mcmaster.ca



More information about the NumPy-Discussion mailing list