su, 2007-11-04 kello 11:13 -1000, Eric Firing kirjoitti: > A quick scan of the tickets did not show me anything like the following, > but I might have missed it. The attached script generates a segfault on > my ubuntu feisty system with svn numpy. Running inside of ipython, the > segfault occurs upon exiting ipython, not upon running the script. > Running the script from the command line gives the attached trace.
Also on numpy 1.0.3.1, self-built on Ubuntu gutsy. Valgrind shows this: $ valgrind --suppressions=/home/pauli/.valgrind/valgrind-python.supp python -c 'import numpy; u = numpy.array([]); g = numpy.array([True, True]); u[g] = 0' ==17983== Memcheck, a memory error detector. ==17983== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==17983== Using LibVEX rev 1732, a library for dynamic binary translation. ==17983== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==17983== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework. ==17983== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==17983== For more details, rerun with: -v ==17983== ==17983== Invalid write of size 4 ==17983== at 0x46275AF: DOUBLE_copyswap (arraytypes.inc.src:999) ==17983== by 0x4655C80: iter_ass_subscript (arrayobject.c:9348) ==17983== by 0x4658620: array_ass_sub (arrayobject.c:2971) ==17983== by 0x80C550D: PyEval_EvalFrameEx (ceval.c:1497) ==17983== by 0x80CA114: PyEval_EvalCodeEx (ceval.c:2831) ==17983== by 0x80CA186: PyEval_EvalCode (ceval.c:494) ==17983== by 0x80EA371: PyRun_StringFlags (pythonrun.c:1273) ==17983== by 0x80EA434: PyRun_SimpleStringFlags (pythonrun.c:900) ==17983== by 0x8058DBD: Py_Main (main.c:512) ==17983== by 0x80588C1: main (python.c:23) ==17983== Address 0x433C390 is 0 bytes after a block of size 8 alloc'd ==17983== at 0x4021765: malloc (vg_replace_malloc.c:149) ==17983== by 0x4634A77: PyArray_NewFromDescr (arrayobject.c:5430) ==17983== by 0x463BA49: PyArray_FromAny (arrayobject.c:7428) ==17983== by 0x464C025: PyArray_CheckFromAny (arrayobject.c:8607) ==17983== by 0x464C261: _array_fromobject (multiarraymodule.c:5640) ==17983== by 0x80C8EEB: PyEval_EvalFrameEx (ceval.c:3564) ==17983== by 0x80CA114: PyEval_EvalCodeEx (ceval.c:2831) ==17983== by 0x80CA186: PyEval_EvalCode (ceval.c:494) ==17983== by 0x80EA371: PyRun_StringFlags (pythonrun.c:1273) ==17983== by 0x80EA434: PyRun_SimpleStringFlags (pythonrun.c:900) ==17983== by 0x8058DBD: Py_Main (main.c:512) ==17983== by 0x80588C1: main (python.c:23) ==17983== ==17983== Invalid write of size 4 ==17983== at 0x46275B4: DOUBLE_copyswap (arraytypes.inc.src:999) ==17983== by 0x4655C80: iter_ass_subscript (arrayobject.c:9348) ==17983== by 0x4658620: array_ass_sub (arrayobject.c:2971) ==17983== by 0x80C550D: PyEval_EvalFrameEx (ceval.c:1497) ==17983== by 0x80CA114: PyEval_EvalCodeEx (ceval.c:2831) ==17983== by 0x80CA186: PyEval_EvalCode (ceval.c:494) ==17983== by 0x80EA371: PyRun_StringFlags (pythonrun.c:1273) ==17983== by 0x80EA434: PyRun_SimpleStringFlags (pythonrun.c:900) ==17983== by 0x8058DBD: Py_Main (main.c:512) ==17983== by 0x80588C1: main (python.c:23) ==17983== Address 0x433C394 is 4 bytes after a block of size 8 alloc'd ==17983== at 0x4021765: malloc (vg_replace_malloc.c:149) ==17983== by 0x4634A77: PyArray_NewFromDescr (arrayobject.c:5430) ==17983== by 0x463BA49: PyArray_FromAny (arrayobject.c:7428) ==17983== by 0x464C025: PyArray_CheckFromAny (arrayobject.c:8607) ==17983== by 0x464C261: _array_fromobject (multiarraymodule.c:5640) ==17983== by 0x80C8EEB: PyEval_EvalFrameEx (ceval.c:3564) ==17983== by 0x80CA114: PyEval_EvalCodeEx (ceval.c:2831) ==17983== by 0x80CA186: PyEval_EvalCode (ceval.c:494) ==17983== by 0x80EA371: PyRun_StringFlags (pythonrun.c:1273) ==17983== by 0x80EA434: PyRun_SimpleStringFlags (pythonrun.c:900) ==17983== by 0x8058DBD: Py_Main (main.c:512) ==17983== by 0x80588C1: main (python.c:23) ==17983== ==17983== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 1395 from 8) ==17983== malloc/free: in use at exit: 2,042,554 bytes in 691 blocks. ==17983== malloc/free: 73,854 allocs, 73,163 frees, 35,375,892 bytes allocated. ==17983== For counts of detected errors, rerun with: -v ==17983== searching for pointers to 691 not-freed blocks. ==17983== checked 3,292,072 bytes. ==17983== ==17983== LEAK SUMMARY: ==17983== definitely lost: 0 bytes in 0 blocks. ==17983== possibly lost: 36,150 bytes in 57 blocks. ==17983== still reachable: 2,006,404 bytes in 634 blocks. ==17983== suppressed: 0 bytes in 0 blocks. ==17983== Rerun with --leak-check=full to see details of leaked memory. _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
