diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-16 17:18:36 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-16 17:18:36 +0000 |
commit | 221373f040d37efa146b635e4ed58b8334fcb8bf (patch) | |
tree | 8ecf2a3d17022d51c025cd2afd0ab414d37b6f2a /pp_hot.c | |
parent | 0eb4ebd7b699fc429e8edad9358a70c2ea08eaaf (diff) | |
download | perl-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.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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); |