Skip Menu |

This queue is for tickets about the Clone CPAN distribution.

Report information
The Basics
Id: 97525
Status: open
Priority: 0/
Queue: Clone

Owner: Nobody in particular
Requestors: ralf [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: stack overflow with moderately complex data structures
Date: Sat, 26 Jul 2014 15:29:58 +0200
To: bug-Clone [...], bug-Storable [...], bug-threads [...]
From: Ralf Neubauer <ralf [...]>
Download (untitled) / with headers
text/plain 940b
This comes from the discussion of [ #97508]: $ ulimit -s 8192 $ perl -e 'use Clone qw(clone); $t = [$t] for 1..30000; clone $t' $ perl -e 'use Clone qw(clone); $t = [$t] for 1..40000; clone $t' Segmentation fault (core dumped) $ ulimit -s 16348 $ perl -e 'use Clone qw(clone); $t = [$t] for 1..40000; clone $t' $ perl -e 'use Clone qw(clone); $t = [$t] for 1..60000; clone $t' $ perl -e 'use Clone qw(clone); $t = [$t] for 1..70000; clone $t' Segmentation fault (core dumped) $ dpkg -l perl libclone-perl | grep ii ii libclone-perl 0.36-1 amd64 module for recursively copying Perl datatypes ii perl 5.18.2-2ubuntu1 amd64 Larry Wall's Practical Extraction and Report Language The same happens with: $ perl -e 'use threads; $t = [$t] for 1..30000; (async {})->join' Segmentation fault (core dumped) $ perl -e 'use Storable qw(dclone); $t = [$t] for 1..30000; dclone $t' Segmentation fault (core dumped)
Subject: [ #97525] stack trace
Date: Fri, 6 Nov 2015 14:42:13 +0000
To: "bug-Clone [...]" <bug-Clone [...]>
From: "Neubauer, Ralf" <ralf.neubauer [...]>
Download (untitled) / with headers
text/plain 411b
According to this stack trace (generated by stsc) this is a recursion only involving av_clone() and sv_clone() from auto/Clone/ , which is completely internal to the Clone distribution: I would humbly suggest switching from recursion to some explicitly coded iterative traversal (e.g. maintaining an explicit recursion stack in the heap). Ralf

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to