New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file:line caller info is changed unexpectedly #16047
Comments
From @KES777Created by @KES777In next dump of stack frames you can notice that: 1. lib/Devel/DB.pm:74 Appears at many stack frames and before -e:0 frame I suppose that some reference is placed into frame info (or reference to some global variable) $ perl -Ilib -d:DB -e 0 The code to reproduce this case: cat lib/Devel/DB.pm # use Sub::Identify qw/ sub_name /; sub frames { my $frames = []; return $frames; sub dumper { my $result; return $result; sub fn { 1 } BEGIN{ sub DB { Scope::Cleanup::establish_cleanup( \&fn ); use Scope::Cleanup(); 1; The problem posibly relates to: Perl Info
|
From zefram@fysh.orgKES wrote:
Debugger hooks, which you're using, get called implicitly from many Please stop reporting bugs around the debugger mechanisms until you Btw, you're using Scope::Cleanup incorrectly. You need to load the -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Mon, Jun 26, 2017 at 01:22:47PM -0700, KES wrote:
Sorry, but life is too short. Can you do any or all of of the following: provide an example which doesn't rely on external modules to reproduce provide a clear explanation of what the output you show represents; explain in more detail which part of the output is not as you expect, -- |
From @KES777Hi. I fixed Devel::DB by replacing Scope::Cleanup by Test:: In both places when I do stacktrace: I am called from -e:0 so first three frames should be same. main -e 0 (eval) VS main -e 0 (eval) Look at attached example.pl Because -d will add 'use DB::Devel;' as zero line I expect '-e:0' file:line for first two frames for both cases; 2. Also you may notice that first, second, fourth, fifth frames have have file:line. main lib/Test.pm 0 DB::BEGIN I suppose the reference is placed onto the stack, but copy should be done What I expect to see: DB lib/Devel/DB.pm 23 DB::frames DB lib/Devel/DB.pm 23 DB::frames |
From @KES777 |
From @iabynOn Tue, Jun 27, 2017 at 12:16:55PM +0300, KES wrote:
This has nothing in particular to do with DB - a similar result can be $ cat /tmp/P.pm package P; use Carp; sub foo { BEGIN { $ ./perl -Ilib -I/tmp -MP -e0 The issue is that when the caller is not runtime code but the parser I think this would non-trivial to fix. The question is, does it need fixing? Is this actually an important issue -- |
From @demerphqOn 29 June 2017 at 10:55, Dave Mitchell <davem@iabyn.com> wrote:
Could it be worked around by making the file/lineno from these cases
I have to admit I have been confused by these in the past, I know what Yves -- |
From @iabynOn Thu, Jun 29, 2017 at 11:13:00AM +0200, demerphq wrote:
In a simple implementation that would zap the correct entries which make -- |
From @KES777
Example: This confuse |
From @xsawyerxOn 06/27/2017 02:32 AM, Zefram wrote:
Zefram, I understand your frustration with this situation, but this Thank you, |
Migrated from rt.perl.org#131660 (status was 'open')
Searchable as RT131660$
The text was updated successfully, but these errors were encountered: