[Numpy-discussion] segmentation fault

Nils Wagner nwagner@iam.uni-stuttgart...
Wed May 28 10:17:45 CDT 2008


On Wed, 28 May 2008 11:07:16 -0400
  Scott Ransom <sransom@nrao.edu> wrote:
> 
> On Wednesday 28 May 2008 10:51:20 am Alan McIntyre 
>wrote:
>> On Wed, May 28, 2008 at 10:30 AM, Keith Goodman 
>><kwgoodman@gmail.com> 
> wrote:
>> > Does anyone else get this seg fault?
>> >
>> >>> def fn():
>> >
>> >    x = np.random.rand(5,2)
>> >    x.cumsum(None, out=x)
>> >    return x
>> >
>> >   ....:
>> >>> fn()
>> >
>> > *** glibc detected *** /usr/bin/python: double free or 
>>corruption
>> > (out): 0x08212dc8 ***
>> >
>> > I'm running 1.0.4 from Debian Lenny with python 2.5.2 
>>compiled with
>> > gcc 4.2.3-3, if that matters.
>>
>> Yep I get one here too, using numpy and Python 2.5 from 
>>svn trunk. 
>> It doesn't always happen on the first invocation of the 
>>function. 
> 
> Ah.  That appears to be correct.  My last posting said 
>that I didn't see 
> this.  But after running it a few times I get a 
>segfault.
> 
> Scott
> -- 
> Scott M. Ransom            Address:  NRAO
> Phone:  (434) 296-0320               520 Edgemont Rd.
> email:  sransom@nrao.edu             Charlottesville, VA 
>22903 USA
> GPG Fingerprint: 06A9 9553 78BE 16DB 407B  FFCA 9BFA 
>B6FF FFD3 2989
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion

Here is a backtrace

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182894182272 (LWP 22329)]
collect (generation=2) at Modules/gcmodule.c:242
242                     gc->gc.gc_refs = 
FROM_GC(gc)->ob_refcnt;
(gdb) bt
#0  collect (generation=2) at Modules/gcmodule.c:242
#1  0x00000000004ba049 in PyGC_Collect () at 
Modules/gcmodule.c:1265
#2  0x00000000004af43d in Py_Finalize () at 
Python/pythonrun.c:387
#3  0x0000000000411c97 in Py_Main (argc=-1073743320, 
argv=Variable "argv" is not available.
) at Modules/main.c:545
#4  0x0000003643a1c3fb in __libc_start_main () from 
/lib64/tls/libc.so.6
#5  0x000000000041163a in _start ()
  


More information about the Numpy-discussion mailing list