[Numpy-svn] [numpy/numpy] 7b7666: Revert "BUG: ticket #1578, Fix python-debug warnin...

GitHub noreply@github....
Sat Apr 14 21:53:23 CDT 2012

  Branch: refs/heads/maintenance/1.6.x
  Home:   https://github.com/numpy/numpy
  Commit: 7b7666b9cbb9b6e62be90458afe99ee44c621a9c
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2012-04-14 (Sat, 14 Apr 2012)

  Changed paths:
    M numpy/core/src/multiarray/scalarapi.c
    M numpy/core/src/multiarray/ucsnarrow.c

  Log Message:
  Revert "BUG: ticket #1578, Fix python-debug warning for python >= 2.7."

This reverts commit 0a3a954c3750419552c076aa444563ac20def14a. The fix
caused segfaults for python built using the default ucs2 unicode size. It
looks like the cause is memory corruption in the PyObject pooled memory. In
particular, the routines in ucsnarrow.c lack the checks and fallbacks
present in the original Python source code in Objects/unicodeobject.c. I
think the best fix is to rewrite the relevant bits of numpy code so that
they don't use the MyPyUnicode_* routines at all, but rather the routines
present in Python.

More information about the Numpy-svn mailing list