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

[perl #113438] caller() skips XS funcs

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
July 13, 2013 12:36
Subject:
[perl #113438] caller() skips XS funcs
Message ID:
rt-3.6.HEAD-2552-1373718990-557.113438-15-0@perl.org
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.

[snip]
> > 
> > 
> > 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
https://rt.perl.org:443/rt3/Ticket/Display.html?id=113438

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About