Re: [Numpy-discussion] Is it a bug ?

Charles G Waldman <cgw@fnal.gov> writes:
Numeric.__version__ '11'
I tested for the bug in the Numeric version 11 on the following: Python 1.5.2+ (#7, Nov 13 1999, 17:39:22) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Python 1.5.2+ (#4, Oct 6 1999, 22:18:42) [C] on linux2 (alpha with cc) Python 1.5.2 (#1, Apr 18 1999, 16:03:16) [GCC pgcc-2.91.60 19981201 (egcs-1.1.1 on linux2 The bug was not present on these, nor in Numeric 15.2 in an SGI. So the problem seems to be not in the source but in the installation (or the compiler). -- Janne

Hy Numeric people! Thank you very much Janne for your suggestion of a compilation problem. I just recompiled with debug option and the Numeric.arange(2)*1j problem disapeared. Further testing of my Numeric 1.7 code shows that the code still breaks: Python 1.5.2 (#9, May 30 2000, 15:08:12) [GCC 2.95.2 19991024 (release)] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam Hello from .pythonrc.py
Program received signal SIGSEGV, Segmentation fault. 0x4006b570 in malloc () (gdb) where (see at the end of message for debug info) I have no idea if it is another bug or another compilation problem. If this is an installation or compilation problem, I am surprised it occures with standart linux, gcc. But I understand it can happens. Proposal : a test for these problems should be included in test_all.py or other test of the module. I installed with Distutils-0.8.2 and tested with test_all.py without notification of any problem. PS: I have the problem with Numeric 11 (distribution 14 compiled with egcc) Thanks a lot for your help, Jean-Bernard On 2 Jun 2000, Janne Sinkkonen wrote:
GNU gdb 4.17.m68k.objc.threads.hwwp.fpu.gnat Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-pc-linux-gnu"... (gdb) run Starting program: /users/jbaddor/bin/python Python 1.5.2 (#9, May 30 2000, 15:08:12) [GCC 2.95.2 19991024 (release)] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam Hello from .pythonrc.py
Program received signal SIGSEGV, Segmentation fault. 0x4006b570 in malloc () (gdb) where #0 0x4006b570 in malloc () #1 0x4006b0f5 in malloc () #2 0x8070c16 in PyString_FromStringAndSize (str=0x80d982c "[0j , (1+0j) , ", size=14) at stringobject.c:95 #3 0x80711b9 in string_slice (a=0x80d9818, i=0, j=14) at stringobject.c:381 #4 0x80621ca in PySequence_GetSlice (s=0x80d9818, i1=0, i2=-1) at abstract.c:869 #5 0x807920e in apply_slice (u=0x80d9818, v=0x0, w=0x80a39cc) at ceval.c:2552 #6 0x807699c in eval_code2 (co=0x80b4e88, globals=0x80b4d78, locals=0x0, args=0x8102758, argcount=5, kws=0x810276c, kwcount=1, defs=0x80e1554, defcount=2, owner=0x0) at ceval.c:938 #7 0x8077bbc in eval_code2 (co=0x80b4e88, globals=0x80b4d78, locals=0x0, args=0x80d32cc, argcount=6, kws=0x80d32e4, kwcount=0, defs=0x80e1554, defcount=2, owner=0x0) at ceval.c:1612 #8 0x8077bbc in eval_code2 (co=0x80e7818, globals=0x80b4d78, locals=0x0, args=0x80d8ba0, argcount=6, kws=0x80d8bb8, kwcount=0, defs=0x80e19bc, defcount=5, owner=0x0) at ceval.c:1612 #9 0x8077bbc in eval_code2 (co=0x80d5870, globals=0x80d95b0, locals=0x0, args=0x8102a0c, argcount=1, kws=0x0, kwcount=0, defs=0x80e65c4, defcount=3, owner=0x0) at ceval.c:1612 #10 0x807909d in call_function (func=0x80b4d58, arg=0x8102a00, kw=0x0) at ceval.c:2484 #11 0x8078c4d in PyEval_CallObjectWithKeywords (func=0x80b4d58, arg=0x8102a00, kw=0x0) at ceval.c:2322 #12 0x4014d405 in array_repr (self=0x80d3000) at Src/arrayobject.c:1119 #13 0x806ff52 in PyObject_Repr (v=0x80d3000) at object.c:237 #14 0x806fe5b in PyObject_Print (op=0x80d3000, fp=0x809f0c8, flags=0) at object.c:188 #15 0x8067e2e in PyFile_WriteObject (v=0x80d3000, f=0x80a2880, flags=0) at fileobject.c:1044 #16 0x8076c55 in eval_code2 (co=0x80d3598, globals=0x80a37e8, locals=0x80a37e8, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, owner=0x0) at ceval.c:1030 #17 0x8076008 in PyEval_EvalCode (co=0x80d3598, globals=0x80a37e8, locals=0x80a37e8) at ceval.c:324 #18 0x805c957 in run_node (n=0x80c7798, filename=0x8088027 "<stdin>", globals=0x80a37e8, locals=0x80a37e8) at pythonrun.c:887 #19 0x805bdf8 in PyRun_InteractiveOne (fp=0x809f170, filename=0x8088027 "<stdin>") at pythonrun.c:528 #20 0x805bc6f in PyRun_InteractiveLoop (fp=0x809f170, filename=0x8088027 "<stdin>") at pythonrun.c:472 #21 0x805bbb2 in PyRun_AnyFile (fp=0x809f170, filename=0x8088027 "<stdin>") at pythonrun.c:449 #22 0x804efd9 in Py_Main (argc=1, argv=0xbffffbb4) at main.c:287 #23 0x804ea5a in main (argc=1, argv=0xbffffbb4) at python.c:12 (gdb)

Hy Numeric people! Thank you very much Janne for your suggestion of a compilation problem. I just recompiled with debug option and the Numeric.arange(2)*1j problem disapeared. Further testing of my Numeric 1.7 code shows that the code still breaks: Python 1.5.2 (#9, May 30 2000, 15:08:12) [GCC 2.95.2 19991024 (release)] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam Hello from .pythonrc.py
Program received signal SIGSEGV, Segmentation fault. 0x4006b570 in malloc () (gdb) where (see at the end of message for debug info) I have no idea if it is another bug or another compilation problem. If this is an installation or compilation problem, I am surprised it occures with standart linux, gcc. But I understand it can happens. Proposal : a test for these problems should be included in test_all.py or other test of the module. I installed with Distutils-0.8.2 and tested with test_all.py without notification of any problem. PS: I have the problem with Numeric 11 (distribution 14 compiled with egcc) Thanks a lot for your help, Jean-Bernard On 2 Jun 2000, Janne Sinkkonen wrote:
GNU gdb 4.17.m68k.objc.threads.hwwp.fpu.gnat Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-pc-linux-gnu"... (gdb) run Starting program: /users/jbaddor/bin/python Python 1.5.2 (#9, May 30 2000, 15:08:12) [GCC 2.95.2 19991024 (release)] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam Hello from .pythonrc.py
Program received signal SIGSEGV, Segmentation fault. 0x4006b570 in malloc () (gdb) where #0 0x4006b570 in malloc () #1 0x4006b0f5 in malloc () #2 0x8070c16 in PyString_FromStringAndSize (str=0x80d982c "[0j , (1+0j) , ", size=14) at stringobject.c:95 #3 0x80711b9 in string_slice (a=0x80d9818, i=0, j=14) at stringobject.c:381 #4 0x80621ca in PySequence_GetSlice (s=0x80d9818, i1=0, i2=-1) at abstract.c:869 #5 0x807920e in apply_slice (u=0x80d9818, v=0x0, w=0x80a39cc) at ceval.c:2552 #6 0x807699c in eval_code2 (co=0x80b4e88, globals=0x80b4d78, locals=0x0, args=0x8102758, argcount=5, kws=0x810276c, kwcount=1, defs=0x80e1554, defcount=2, owner=0x0) at ceval.c:938 #7 0x8077bbc in eval_code2 (co=0x80b4e88, globals=0x80b4d78, locals=0x0, args=0x80d32cc, argcount=6, kws=0x80d32e4, kwcount=0, defs=0x80e1554, defcount=2, owner=0x0) at ceval.c:1612 #8 0x8077bbc in eval_code2 (co=0x80e7818, globals=0x80b4d78, locals=0x0, args=0x80d8ba0, argcount=6, kws=0x80d8bb8, kwcount=0, defs=0x80e19bc, defcount=5, owner=0x0) at ceval.c:1612 #9 0x8077bbc in eval_code2 (co=0x80d5870, globals=0x80d95b0, locals=0x0, args=0x8102a0c, argcount=1, kws=0x0, kwcount=0, defs=0x80e65c4, defcount=3, owner=0x0) at ceval.c:1612 #10 0x807909d in call_function (func=0x80b4d58, arg=0x8102a00, kw=0x0) at ceval.c:2484 #11 0x8078c4d in PyEval_CallObjectWithKeywords (func=0x80b4d58, arg=0x8102a00, kw=0x0) at ceval.c:2322 #12 0x4014d405 in array_repr (self=0x80d3000) at Src/arrayobject.c:1119 #13 0x806ff52 in PyObject_Repr (v=0x80d3000) at object.c:237 #14 0x806fe5b in PyObject_Print (op=0x80d3000, fp=0x809f0c8, flags=0) at object.c:188 #15 0x8067e2e in PyFile_WriteObject (v=0x80d3000, f=0x80a2880, flags=0) at fileobject.c:1044 #16 0x8076c55 in eval_code2 (co=0x80d3598, globals=0x80a37e8, locals=0x80a37e8, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, owner=0x0) at ceval.c:1030 #17 0x8076008 in PyEval_EvalCode (co=0x80d3598, globals=0x80a37e8, locals=0x80a37e8) at ceval.c:324 #18 0x805c957 in run_node (n=0x80c7798, filename=0x8088027 "<stdin>", globals=0x80a37e8, locals=0x80a37e8) at pythonrun.c:887 #19 0x805bdf8 in PyRun_InteractiveOne (fp=0x809f170, filename=0x8088027 "<stdin>") at pythonrun.c:528 #20 0x805bc6f in PyRun_InteractiveLoop (fp=0x809f170, filename=0x8088027 "<stdin>") at pythonrun.c:472 #21 0x805bbb2 in PyRun_AnyFile (fp=0x809f170, filename=0x8088027 "<stdin>") at pythonrun.c:449 #22 0x804efd9 in Py_Main (argc=1, argv=0xbffffbb4) at main.c:287 #23 0x804ea5a in main (argc=1, argv=0xbffffbb4) at python.c:12 (gdb)
participants (2)
-
Janne Sinkkonen
-
Jean-Bernard Addor