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

[perl #113438] caller() skips XS funcs

Thread Previous | Thread Next
James E Keenan via RT
July 13, 2013 12:36
[perl #113438] caller() skips XS funcs
Message ID:
On Fri Jul 13 17:04:20 2012, sprout wrote:
> On Wed May 30 13:12:41 2012, bulk88 wrote:
> > caller() does not see XS functions. Given this XS func.

> > 
> > 
> > The output shows caller can't see XS funcs in the call stack. This bug
> >    causes Perl code that inspect the call stack to not see the XS
> >    func's package or its existence, and therefore see the package of
> >    the last pure Perl sub, not any intermediate XS funcs and therefore
> >    act on the wrong package. If I take a C debugger to the XS func,
> >    and look at "my_perl->Icurcop->cop_stashpv" inside
> >    Local::XS::Caller(), it says "main". Caller() XS func is not in
> >    main.
> I think this is by design.  The whole point of XSUBs is that they are
> fast because they don’t use the context stack.  This also means that
> XSUBs can have direct access to the caller’s environment.

Father C's explanation of a year ago suggests that this report should be
classified as not-a-bug and be closed.

I am taking the ticket for the purpose of doing so in seven days unless
someone objects and moves the discussion forward.

Thank you very much.
Jim Keenan

via perlbug:  queue: perl5 status: open

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