This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
stop %^H pointing to being-freed hash; #112326
The leave_scope() action SAVEt_HINTS does the following to
GvHV(PL_hintgv): first it SvREFCNT_dec()'s it, then sets it to NULL.
If the current %^H contains a destructor, then that will be
executed while %^H still points to the hash being freed.
This can cause bad things to happen, like iterating over the hash being
freed.
Instead, setGvHV(PL_hintgv) to NULL first, *then* free the hash.