On Tue, Feb 16, 2010 at 05:50:40PM +0000, Tim Bunce wrote:
> Thanks for background detail and test Nick. Very helpful.
> I'll give it some thought, hopefully tonight.

No problem.

I didn't like finding a failing test, so tried to fix it. I failed on that,
but at least figured out the cause, and ruled out and removed all the external
dependencies.

About the only thing I didn't have in my description was that at the point of
the SEGV, subr_entry_ix is 0. (Because it gets reset to that value.
Effectively the profiler thinks that it's still running at the top level of
the program, when actually its inside a method call.)

I suspect, but can't easily test from here, that a goto \&sub inside an
import called via use on 5.8.8 and earlier will fail similarly for the same
reason. And, I'd guess, tie invocations and overloading invocations.
Maybe even goto \&sub inside BEGIN, CHECK or INIT blocks. :-)

(I'm trying to remember all the places where the interpreter can make calls
out to user code from inside opcodes)

Nicholas Clark

PS It's only just occurred to me that it might be possible to jump sideways out
   of BEGIN blocks. Does it work? Yes:

$ cat sick.pl
#!perl -w
use strict;

sub sick {
    warn "Yuck!";
}

BEGIN {
    goto \&sick;
}

__END__
$ perl sick.pl
Yuck! at sick.pl line 5.

-- 
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]

Reply via email to