[Numpy-discussion] numpy segv on OpenBSD

David M. Cooke cookedm at physics.mcmaster.ca
Thu Jun 15 00:44:54 CDT 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 check_types() 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 check_types test and scalartypes.inc.src's
> gen_dealloc() and gen_alloc() functions I noticed that the error occurs
> up after calling gen_dealloc() on a complex128scalar that was created as
> check_types's "valb" variable as it is GC'd.
> 
> The check_types 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