Revision: 1056
Author: [email protected]
Date: Tue Feb 16 07:44:10 2010
Log: Better test for RT#54600
The problem is caused by S_call_body() in 5.8.8 and earlier making a direct
call to Perl_pp_entersub(), rather than indirecting via
PL_ppaddr[OP_ENTERSUB].
Hence any calls made through it (such as DESTROY) never reach our
pp_subcall_profiler, and subr_entry_setup() is never called to initialse
subr_entry_ix. Hence if if the DESTROY routine (or an AUTOLOAD called in
lieu
of it) executes goto \&subname; that does reach pp_subcall_profiler, which
assumes that it must (already) be inside a subroutine.
I don't (yet) know what the right fix (or work around) is.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1056
Modified:
/trunk/t/test82-version.t
=======================================
--- /trunk/t/test82-version.t Sun Feb 14 14:17:41 2010
+++ /trunk/t/test82-version.t Tue Feb 16 07:44:10 2010
@@ -34,7 +34,19 @@
});
__DATA__
-package X;
-require version;
-our $VERSION = '2';
-X->VERSION(1); # core dump
+#!perl -w
+{
+ package X;
+
+ sub warner {
+ print "# Hello world\n"
+ }
+
+ sub DESTROY {
+ goto \&warner;
+ }
+}
+
+my $a = bless [], 'X';
+
+undef $a;
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]