Perl linked list segfault

Matthew Boyle mlb-perl at decisionsoft.co.uk
Wed Nov 4 10:55:36 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:
>>
>>    http://wardley.org/perl/linked_list_segfault.pl
> 
> shifting out all the @tokens works; undefing or emptying @tokens segfaults.
> 
> Is this an ordering thing?

looks like it is a stack issue:

[chemnitz at 10:52 ~]$ ulimit -s
10240
[chemnitz at 10:53 ~]$ perl downloads/linked_list_segfault.pl
# segfaults
[chemnitz at 10:53 ~]$ ulimit -s 20480
[chemnitz at 10:53 ~]$ perl downloads/linked_list_segfault.pl
# is fine
[chemnitz at 10:53 ~]$ perl downloads/linked_list_segfault.pl 80000
# segfaults again

--matt


-- 
Matthew Boyle, Systems Administrator, CoreFiling Limited
Telephone: +44-1865-203192  Website: http://www.corefiling.com


More information about the london.pm mailing list