This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Ensure stack is in consistent state while restoring SAVEt_HINTS
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>
Sat, 27 Jun 2020 15:09:49 +0000 (16:09 +0100)
committerPaul Evans <leonerd@leonerd.org.uk>
Mon, 20 Jul 2020 14:40:42 +0000 (15:40 +0100)
commitae955d3a183337a4770d39640a21da146cf97bc7
tree989e9fabb2b3f451857b67831ca453b85a334841
parentc1d551e18b0505f4fadf5d7cd6b07de35589bd42
Ensure stack is in consistent state while restoring SAVEt_HINTS

SAVEt_HINTS has a non-constant savestack structure. If the
HINT_LOCALIZE_HH flag was set it pushes an additional pointer. In some
complex code scenarios it is possible re├źnter Perl code while destroying
nested PL_hintgv hashes (for example, if any stored objects contain
`free` magic). Because of this, it is important that we pop the extra
value from the save stack before any other code can be invoked, so if
they need to inspect or alter the save stack, they can do so in a
consistent manner.

See also

  https://github.com/Perl/perl5/issues/17895
scope.c