summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-16 17:18:36 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-16 17:18:36 +0000
commit221373f040d37efa146b635e4ed58b8334fcb8bf (patch)
tree8ecf2a3d17022d51c025cd2afd0ab414d37b6f2a /pp_hot.c
parent0eb4ebd7b699fc429e8edad9358a70c2ea08eaaf (diff)
downloadperl-221373f040d37efa146b635e4ed58b8334fcb8bf.tar.gz
assumption about @_ always being non-REAL doesn't hold when
debugger is running; DB::sub() can call arbitrary stuff that modifies @_ at will p4raw-id: //depot/perl@4395
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 2a398e15d3..a7fd9dc142 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2537,7 +2537,13 @@ try_autoload:
"%p entersub preparing @_\n", thr));
#endif
av = (AV*)PL_curpad[0];
- assert(!AvREAL(av));
+ if (AvREAL(av)) {
+ /* @_ is normally not REAL--this should only ever
+ * happen when DB::sub() calls things that modify @_ */
+ av_clear(av);
+ AvREAL_off(av);
+ AvREIFY_on(av);
+ }
#ifndef USE_THREADS
cx->blk_sub.savearray = GvAV(PL_defgv);
GvAV(PL_defgv) = (AV*)SvREFCNT_inc(av);