From: Gurusamy Sarathy Date: Sat, 16 Oct 1999 17:18:36 +0000 (+0000) Subject: assumption about @_ always being non-REAL doesn't hold when X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=221373f040d37efa146b635e4ed58b8334fcb8bf;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/pp_hot.c b/pp_hot.c index 2a398e1..a7fd9dc 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);