Perl linked list segfault

Matthew Boyle mlb-perl at
Wed Nov 4 10:45:13 GMT 2009

Dirk Koopman wrote:
> Andy Wardley wrote:
>> On 04/11/2009 07:55, Andy Wardley wrote:
>>> I've got some code that's making Perl segfault.
>> Here's the complete script in case anyone wants to play along at
>> home:
> shifting out all the @tokens works; undefing or emptying @tokens segfaults.
> Is this an ordering thing?

mine seems to be running out of stack space:

[chemnitz at 10:36 ~]$ gdb perl
GNU gdb Fedora (6.8-32.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(no debugging symbols found)
Missing separate debuginfos, use: debuginfo-install perl-5.10.0-73.fc10.i386
(gdb) run downloads/
Starting program: /usr/bin/perl downloads/


creating linked list of 40000 tokens
created 40000 tokens
creating linked list of 40000 tokens in container
created 40000 tokens
[New Thread 0xb7fe26c0 (LWP 9178)]

Program received signal SIGSEGV, Segmentation fault.
0x026e6105 in Perl_sv_free2 () from 
(gdb) bt -1
#229310 0x08048a2e in main ()

quarter of a million frames is quite a lot :-)


Matthew Boyle, Systems Administrator, CoreFiling Limited
Telephone: +44-1865-203192  Website:

More information about the mailing list