develooper Front page | perl.perl5.changes | Postings from June 2020

[Perl/perl5] c2e57e: Ensure stack is in consistent state whilerestorin...

From:
Paul Evans
Date:
June 27, 2020 15:12
Subject:
[Perl/perl5] c2e57e: Ensure stack is in consistent state whilerestorin...
Message ID:
Perl/perl5/push/refs/heads/leonerd/gh17903/000000-c2e57e@github.com
  Branch: refs/heads/leonerd/gh17903

  Home:   https://github.com/Perl/perl5

  Commit: c2e57e4456c0fa94ae25ae863bc98235cac8490e

      https://github.com/Perl/perl5/commit/c2e57e4456c0fa94ae25ae863bc98235cac8490e

  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>

  Date:   2020-06-27 (Sat, 27 Jun 2020)



  Changed paths:

    M scope.c



  Log Message:

  -----------

  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








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