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 ed9c809..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);
            }
@@ -1858,7 +1861,7 @@ S_sv_i_ncmp(pTHX_ SV *const a, SV *const b)
 }
 
 #define tryCALL_AMAGICbin(left,right,meth) \
-    (PL_amagic_generation && (SvAMAGIC(left)||SvAMAGIC(right))) \
+    (SvAMAGIC(left)||SvAMAGIC(right)) \
        ? amagic_call(left, right, CAT2(meth,_amg), 0) \
        : NULL;