Skip to content

Commit 79f75ea

Browse files
committed
Revert "avoid identical stack traces"
This reverts commit f2f32cd.
1 parent d0b5de5 commit 79f75ea

File tree

6 files changed

+2
-63
lines changed

6 files changed

+2
-63
lines changed

MANIFEST

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5648,9 +5648,6 @@ t/lib/feature/nonesuch Tests for enabling/disabling nonexistent feature
56485648
t/lib/feature/removed Tests for enabling/disabling removed feature
56495649
t/lib/feature/say Tests for enabling/disabling say feature
56505650
t/lib/feature/switch Tests for enabling/disabling switch feature
5651-
t/lib/GH_15109/Apack.pm test Module for caller.t
5652-
t/lib/GH_15109/Bpack.pm test Module for caller.t
5653-
t/lib/GH_15109/Cpack.pm test Module for caller.t
56545651
t/lib/h2ph.h Test header file for h2ph
56555652
t/lib/h2ph.pht Generated output from h2ph.h by h2ph, for comparison
56565653
t/lib/locale/latin1 Part of locale.t in Latin 1

op.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11722,32 +11722,10 @@ S_process_special_blocks(pTHX_ I32 floor, const char *const fullname,
1172211722
(void)CvGV(cv);
1172311723
if (floor) LEAVE_SCOPE(floor);
1172411724
ENTER;
11725-
11726-
SAVEVPTR(PL_curcop);
11727-
if (PL_curcop == &PL_compiling) {
11728-
/* Avoid pushing the "global" &PL_compiling onto the
11729-
* context stack. For example, a stack trace inside
11730-
* nested use's would show all calls coming from whoever
11731-
* most recently updated PL_compiling.cop_file and
11732-
* cop_line. So instead, temporarily set PL_curcop to a
11733-
* private copy of &PL_compiling. PL_curcop will soon be
11734-
* set to point back to &PL_compiling anyway but only
11735-
* after the temp value has been pushed onto the context
11736-
* stack as blk_oldcop.
11737-
* This is slightly hacky, but necessary. Note also
11738-
* that in the brief window before PL_curcop is set back
11739-
* to PL_compiling, IN_PERL_COMPILETIME/IN_PERL_RUNTIME
11740-
* will give the wrong answer.
11741-
*/
11742-
Newx(PL_curcop, 1, COP);
11743-
StructCopy(&PL_compiling, PL_curcop, COP);
11744-
PL_curcop->op_slabbed = 0;
11745-
SAVEFREEPV(PL_curcop);
11746-
}
11747-
1174811725
PUSHSTACKi(PERLSI_REQUIRE);
1174911726
SAVECOPFILE(&PL_compiling);
1175011727
SAVECOPLINE(&PL_compiling);
11728+
SAVEVPTR(PL_curcop);
1175111729

1175211730
DEBUG_x( dump_sub(gv) );
1175311731
Perl_av_create_and_push(aTHX_ &PL_beginav, MUTABLE_SV(cv));

t/lib/GH_15109/Apack.pm

Lines changed: 0 additions & 4 deletions
This file was deleted.

t/lib/GH_15109/Bpack.pm

Lines changed: 0 additions & 4 deletions
This file was deleted.

t/lib/GH_15109/Cpack.pm

Lines changed: 0 additions & 11 deletions
This file was deleted.

t/op/caller.t

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BEGIN {
55
chdir 't' if -d 't';
66
require './test.pl';
77
set_up_inc('../lib');
8-
plan( tests => 109 ); # some tests are run in a BEGIN block
8+
plan( tests => 97 ); # some tests are run in a BEGIN block
99
}
1010

1111
my @c;
@@ -335,22 +335,6 @@ $::testing_caller = 1;
335335

336336
do './op/caller.pl' or die $@;
337337

338-
# GH #15109
339-
# See that callers within a nested series of 'use's gets the right
340-
# filenames.
341-
{
342-
local @INC = 'lib/GH_15109/';
343-
# Apack use's Bpack which use's Cpack which populates @Cpack::caller
344-
# with the file:N of all the callers
345-
eval 'use Apack; 1';
346-
is($@, "", "GH #15109 - eval");
347-
is (scalar(@Cpack::callers), 10, "GH #15109 - callers count");
348-
like($Cpack::callers[$_], qr{GH_15109/Bpack.pm:3}, "GH #15109 level $_") for 0..2;
349-
like($Cpack::callers[$_], qr{GH_15109/Apack.pm:3}, "GH #15109 level $_") for 3..5;
350-
like($Cpack::callers[$_], qr{\(eval \d+\):1}, "GH #15109 level $_") for 6..8;
351-
like($Cpack::callers[$_], qr{caller\.t}, "GH #15109 level $_") for 9;
352-
}
353-
354338
{
355339
package RT129239;
356340
BEGIN {
@@ -364,4 +348,3 @@ do './op/caller.pl' or die $@;
364348
#line 12345 "virtually/op/caller.t"
365349
}
366350
}
367-

0 commit comments

Comments
 (0)