This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add probe for sa_len availability in sockaddr struct
[perl5.git] / pp_sort.c
index f1ec82a..f96d568 100644 (file)
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1679,6 +1679,9 @@ PP(pp_sort)
 
            if (!(flags & OPf_SPECIAL)) {
                SV *sv;
+               /* Reset cx, in case the context stack has been
+                  reallocated. */
+               cx = &cxstack[cxstack_ix];
                POPSUB(cx, sv);
                LEAVESUB(sv);
            }