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

GitHub noreply@github....
Sat Apr 14 21:51:49 CDT 2012

  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 0679842c6059f7abcb8f9d724a1342021b78ed49
  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