develooper Front page | perl.perl5.porters | Postings from July 2016

Re: [perl #128258] Segfault due to stack overflow: 'subUNIVERSAL::DESTROY{$e=bless[]}'

Thread Previous | Thread Next
Dave Mitchell
July 7, 2016 16:23
Re: [perl #128258] Segfault due to stack overflow: 'subUNIVERSAL::DESTROY{$e=bless[]}'
Message ID:
On Thu, May 26, 2016 at 06:33:34PM -0700, Dan Collins wrote:
> dcollins@nightshade64:~/perl$ ./miniperl -Ilib -e 'sub UNIVERSAL::DESTROY{$e=bless[]}'
> Segmentation fault
> This is a stack overflow issue due to infinite recursion. Here is the looping series of stack frames:

I've added it to the #111358: [META] C stack recursion ticket.
There isn't any obvious way that I can think of of avoiding this, apart
from maybe refusing to call a destructor if its current depth is over some
arbitrary limit; and even then, croaking with "too deep in DESTROY" might
trigger destructors which create a new recursion cycle.

You never really learn to swear until you learn to drive.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About