This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #124097] don't let the GPs be removed out from under pp_sort
pp_sort() saves the SV pointers for *a and *b, if the sort block
cleared *a or *b the GP, which the pointer is stored would be freed
and the save stack processing would try to write to freed memory.
Make sure the GP lasts at least long enough for the SV slots to be
restored. This doesn't attempt to restore *a or *b, the user chose
to clear them.