New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perl segfaults with blown stack while cleaning up large linked list. #9947
Comments
From abw@wardley.orgThis is a bug report for perl from abw@wardley.org I've got some code that's making Perl segfault (see attachment). A little The bug is reliably reproducible on all the versions of Perl that I've More detail follows... I'm creating a linked list using array references as nodes. The first element while (++$n < $max) { Using the above code I can create a linked list of 100 million nodes and However, if I also stuff the nodes into a container list then Perl segfaults while (++$n < $max) { In this case Perl will reliably segfault with a mere 30,000 nodes. If I just push them onto @tokens and don't create the linked list then it A ready-to-run version of the test script is attached. Also available here: http://wardley.org/perl/linked_list_segfault.pl I tested this on my Macbook using versions 5.8, 5.10.0, 5.10.1 and 5.11.1, Now convinced that this was a bug in Perl, I enlisted the help of London.pm On 04/11/2009 10:45, Matthew Boyle wrote:
On 04/11/2009 10:55, Matthew Boyle wrote:
On 04/11/2009 10:46, Dagfinn Ilmari Mannsåker wrote:
Flags: Site configuration information for perl 5.11.1: Configured by abw at Tue Nov 3 19:06:07 GMT 2009. Summary of my perl5 (revision 5 version 11 subversion 1) configuration: Platform: Locally applied patches: @INC for perl 5.11.1: Environment for perl 5.11.1: PATH=/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/Users/abw/bin:/usr/local/ImageMagick/bin:. |
abw@wardley.org - Status changed from 'new' to 'open' |
From zefram@fysh.orgAndy Wardley wrote:
I have a fairly clear idea of how to fix this. I'll look into it. -zefram |
From andrew@pimlott.netCreated by andrew@pimlott.netThe following seg faults after printing "built": my $h = {}; I originally encountered this with a data structure built by XML::Twig, but #0 0x00000000004a7942 in Perl_sv_clear (my_perl=0xe9a010, sv=0x1d2b8f8) (Line numbers are from the Debian perl_5.10.1-12 source package.) The 7-step cycle repeats over and over: Perl_sv_clear -> Is there any way around this? It's a shame that perl can manipulate a large Andrew Perl Info
|
The RT System itself - Status changed from 'new' to 'open' |
From zefram@fysh.organdrew@pimlott.net wrote:
It's essentially a duplicate of [perl #70253]. -zefram |
From andrew@pimlott.netZefram wrote:
Do you intend to fix the garbage collector to use its own stack? Has it Andrew |
From @cpansproutThis was resolved in 5.14.0 as part of the fix for #44225. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#70253 (status was 'resolved')
Searchable as RT70253$
The text was updated successfully, but these errors were encountered: