[Numpy-discussion] NumPy SVN broken

Charles R Harris charlesr.harris@gmail....
Tue Oct 6 12:31:22 CDT 2009


On Tue, Oct 6, 2009 at 11:14 AM, David Cournapeau <cournape@gmail.com>wrote:

> On Wed, Oct 7, 2009 at 2:04 AM, Charles R Harris
> <charlesr.harris@gmail.com> wrote:
> >
> >
> > On Tue, Oct 6, 2009 at 10:50 AM, David Cournapeau <cournape@gmail.com>
> > wrote:
> >>
> >> On Wed, Oct 7, 2009 at 1:36 AM, Charles R Harris
> >> <charlesr.harris@gmail.com> wrote:
> >> >
> >> >
> >> > 2009/10/6 Stéfan van der Walt <stefan@sun.ac.za>
> >> >>
> >> >> Hi all,
> >> >>
> >> >> The current SVN HEAD of NumPy is broken and should not be used.
> >> >> Extensions compiled against this version may (will) segfault.
> >> >>
> >> >
> >> > Can you be more specific? I haven't had any problems running current
> svn
> >> > with scipy.
> >>
> >> The version itself is fine, but the ABI has been changed in an
> >> incompatible way: if you have an extension built against say numpy
> >> 1.2.1, and then use a numpy built from sources after the datetime
> >> merge, it will segfault right away. It does so for scipy and several
> >> custom extensions. The abi breakage was found to be the datetime
> >> merge.
> >>
> >
> > Ah... That's a fine kettle of fish. Any idea what ABI calls are causing
> the
> > problem? Maybe the dtype change wasn't made in a compatible way. IIRC,
> > something was added to the dtype?
>
> Yes, but that should not cause trouble. Adding members to structure
> should be fine.
>
> I quickly look at the diff, and some changes in the code generators
> look suspicious, e.g.:
>
>  types = ['Generic','Number','Integer','SignedInteger','UnsignedInteger',
> -         'Inexact',
> +         'Inexact', 'TimeInteger',
>          'Floating', 'ComplexFloating', 'Flexible', 'Character',
>          'Byte','Short','Int', 'Long', 'LongLong', 'UByte', 'UShort',
>          'UInt', 'ULong', 'ULongLong', 'Float', 'Double', 'LongDouble',
>          'CFloat', 'CDouble', 'CLongDouble', 'Object', 'String', 'Unicode',
> -         'Void']
> +         'Void', 'Datetime', 'Timedelta']
>
> As the list is used to initialize some values from the API function
> pointer array, inserts  should be avoided. You can see the consequence
> on the generated files, e.g. part of __multiarray_api.h diff between
> datetimemerge and just before:
>
>
Looks like a clue ;)

<snip>

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091006/2f50cf48/attachment.html 


More information about the NumPy-Discussion mailing list