This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fixup to "avoid identical stack traces" - try 2
authorDavid Mitchell <davem@iabyn.com>
Thu, 12 Mar 2020 14:14:24 +0000 (14:14 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 18 Mar 2020 15:23:37 +0000 (15:23 +0000)
commitad89278aa25475fb03971aec66692e18e35d9c07
tree372b56d33bbb6f03b330f5e7f0be3a1a85a92dd9
parent2f07b2fb1d76d4d4f344f296ee3432f3f3ce4580
fixup to "avoid identical stack traces" - try 2

GH #15109, #17567

[ this commit was originally applied as v5.31.9-121-gfb8188b84d, but was
quickly reverted by v5.31.9-124-g6311900a66. I'm now -re-applying it,
but with a 'SAVEFREEOP(PL_curcop)' added, which was missing from the
original commit. ]

My original fix for this issue, v5.31.6-141-gf2f32cd638
made a shallow copy of &PL_compiling. However, for non-default
warning bits, this made two COPs share the malloced() cop_warnings,
and bad things ensured. In particular this was flagged up in:

    GH #17567: "BBC: AYOUNG/OpenVZ-0.01.tar.gz"

The fix in this commit is to do a deep copy of the COP using
newSTATEOP().
MANIFEST
op.c
t/lib/GH_15109/Foo.pm [new file with mode: 0644]
t/op/caller.t