Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-Cover CPAN distribution.

Report information
The Basics
Id: 67610
Status: new
Priority: 0/
Queue: Devel-Cover

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

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

Subject: Infinite loop when run against code with recursive data structures
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1303302823-18805-76"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 513
Download (untitled) / with headers
text/plain 513b
When run on code that contains a recursive data structure that is referenced in a 'use constant' declaration, Devel::Cover goes into an infinite loop and consumes all the memory on the machine. This only happens if the data structure involves two variables that reference each other; it does not happen with a single variable that references itself. It is also necessary to actually use the constant at least once to trigger the bug -- commenting the last line in the attachment also removes the problem.
MIME-Version: 1.0
Content-Type: text/x-perl-script; name=""
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename=""
Content-Transfer-Encoding: binary
Content-Length: 185
text/x-perl 185b
#!/usr/bin/perl use strict; use warnings; my %hash; my %hash2; $hash{hash1} = \%hash2; $hash2{hash2} = \%hash; sub get { return \%hash;} use constant what => get(); my $x = what;

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

Please report any issues with to