<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/2085" rel="nofollow">http://projects.scipy.org/numpy/ticket/2085</a> on 2012-03-19 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sandrotosi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sandrotosi">@sandrotosi</a>, assigned to unknown.</em></p>
<p dir="auto">Hello,<br>
running numpy test suite with python versions 2.7.3rc1 and 3.2.3rc1 (as available in Debian), returns this errors:</p>
<p dir="auto">2.7.3rc1</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running unit tests for numpy
NumPy version 1.6.1
NumPy is installed in /build/buildd-python-numpy_1.6.1-6-i386-lYkcLV/python-numpy-1.6.1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3rc1 (default, Mar 10 2012, 00:01:06) [GCC 4.6.3]
nose version 1.1.2
.........................Debug memory block at address p=0xaa13400: API 'm'
    8 bytes originally requested
    The 3 pad bytes at p-3 are FORBIDDENBYTE, as expected.
    The 4 pad bytes at tail=0xaa13408 are FORBIDDENBYTE, as expected.
    The block was made by call #1026630 to debug malloc/realloc.
    Data at p: a3 03 00 00 00 00 00 00
Fatal Python error: bad ID: Allocated using API 'm', verified using API 'o'"><pre class="notranslate"><code class="notranslate">Running unit tests for numpy
NumPy version 1.6.1
NumPy is installed in /build/buildd-python-numpy_1.6.1-6-i386-lYkcLV/python-numpy-1.6.1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3rc1 (default, Mar 10 2012, 00:01:06) [GCC 4.6.3]
nose version 1.1.2
.........................Debug memory block at address p=0xaa13400: API 'm'
    8 bytes originally requested
    The 3 pad bytes at p-3 are FORBIDDENBYTE, as expected.
    The 4 pad bytes at tail=0xaa13408 are FORBIDDENBYTE, as expected.
    The block was made by call #1026630 to debug malloc/realloc.
    Data at p: a3 03 00 00 00 00 00 00
Fatal Python error: bad ID: Allocated using API 'm', verified using API 'o'
</code></pre></div>
<p dir="auto">3.2.3rc1</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running unit tests for numpy
NumPy version 1.6.1
NumPy is installed in /build/buildd-python-numpy_1.6.1-6-i386-lYkcLV/python-numpy-1.6.1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3rc1 (default, Mar  9 2012, 20:32:02) [GCC 4.6.3]
nose version 1.1.2
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file &lt;_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'&gt;
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
.........................Debug memory block at address p=0xa625310: API 'm'
    8 bytes originally requested
    The 3 pad bytes at p-3 are FORBIDDENBYTE, as expected.
    The 4 pad bytes at tail=0xa625318 are FORBIDDENBYTE, as expected.
    The block was made by call #1475913 to debug malloc/realloc.
    Data at p: a3 03 00 00 00 00 00 00
Fatal Python error: bad ID: Allocated using API 'm', verified using API 'o'
Aborted"><pre class="notranslate"><code class="notranslate">Running unit tests for numpy
NumPy version 1.6.1
NumPy is installed in /build/buildd-python-numpy_1.6.1-6-i386-lYkcLV/python-numpy-1.6.1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3rc1 (default, Mar  9 2012, 20:32:02) [GCC 4.6.3]
nose version 1.1.2
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file &lt;_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'&gt;
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
.........................Debug memory block at address p=0xa625310: API 'm'
    8 bytes originally requested
    The 3 pad bytes at p-3 are FORBIDDENBYTE, as expected.
    The 4 pad bytes at tail=0xa625318 are FORBIDDENBYTE, as expected.
    The block was made by call #1475913 to debug malloc/realloc.
    Data at p: a3 03 00 00 00 00 00 00
Fatal Python error: bad ID: Allocated using API 'm', verified using API 'o'
Aborted
</code></pre></div>
<p dir="auto">It might be something related to newer CPython versions, given testsuite executed on 2.6.7 works fine, but I'm asking you first, just to be sure.</p>
<p dir="auto">Regards,<br>
Sandro</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1578" rel="nofollow">http://projects.scipy.org/numpy/ticket/1578</a> on 2010-08-10 by trac user mbudisic, assigned to unknown.</em></p>
<p dir="auto">I am trying to build my entire Python stack from source on x86_64 machine under CentOS, GCC 4.5.0, with custom compiled ATLAS. Numpy builds but its test crash with SIGABRT signal, when "numpy.test()" is run.</p>
<p dir="auto">This is output into Python shell before exit.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_from_unicode (test_defchararray.TestBasic) ... Debug memory block at address p=0x17941d0: API 'm'
    4 bytes originally requested
    The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected.
    The 8 pad bytes at tail=0x17941d4 are FORBIDDENBYTE, as expected.
    The block was made by call #814353 to debug malloc/realloc.
    Data at p: ff fe 00 00
Fatal Python error: bad ID: Allocated using API 'm', verified using API 'o'"><pre class="notranslate"><code class="notranslate">test_from_unicode (test_defchararray.TestBasic) ... Debug memory block at address p=0x17941d0: API 'm'
    4 bytes originally requested
    The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected.
    The 8 pad bytes at tail=0x17941d4 are FORBIDDENBYTE, as expected.
    The block was made by call #814353 to debug malloc/realloc.
    Data at p: ff fe 00 00
Fatal Python error: bad ID: Allocated using API 'm', verified using API 'o'
</code></pre></div>
<p dir="auto">I'm attaching full gdb backtrace and pystack outputs.</p>