diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-08 15:33:44 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-09 17:09:09 +0000 |
commit | d0abe6c5e0e0a4db696c20e9f839d4a8ecaf4b54 (patch) | |
tree | d6ba9184f1d95c8947eafccef6411ddccf3677af /pp_ctl.c | |
parent | 75d58f20e1bcf22f3c51136478cfb257de1483f6 (diff) | |
download | perl-d0abe6c5e0e0a4db696c20e9f839d4a8ecaf4b54.tar.gz |
[win32] protect sortcop from C<sort { sort { ... } ... } ...>
Message-Id: <199805082333.TAA06287@aatma.engin.umich.edu>
Subject: [PATCH] Re: double recursion in sort
p4raw-id: //depot/win32/perl@918
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -652,8 +652,9 @@ PP(pp_sort) RETPUSHUNDEF; } + ENTER; + SAVEPPTR(sortcop); if (op->op_flags & OPf_STACKED) { - ENTER; if (op->op_flags & OPf_SPECIAL) { OP *kid = cLISTOP->op_first->op_sibling; /* pass pushmark */ kid = kUNOP->op_first; /* pass rv2gv */ @@ -740,7 +741,6 @@ PP(pp_sort) POPSTACK(); CATCH_SET(oldcatch); } - LEAVE; } else { if (max > 1) { @@ -749,6 +749,7 @@ PP(pp_sort) (op->op_private & OPpLOCALE) ? sv_cmp_locale : sv_cmp); } } + LEAVE; stack_sp = ORIGMARK + max; return nextop; } |