summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/perl/cop.h10
-rw-r--r--gnu/usr.bin/perl/patchlevel.h1
-rw-r--r--gnu/usr.bin/perl/t/op/runlevel.t15
3 files changed, 19 insertions, 7 deletions
diff --git a/gnu/usr.bin/perl/cop.h b/gnu/usr.bin/perl/cop.h
index e588675012a..2b9ddf49129 100644
--- a/gnu/usr.bin/perl/cop.h
+++ b/gnu/usr.bin/perl/cop.h
@@ -105,13 +105,9 @@ struct block_sub {
} STMT_END
#endif /* USE_THREADS */
-#ifdef USE_ITHREADS
- /* junk in @_ spells trouble when cloning CVs, so don't leave any */
-# define CLEAR_ARGARRAY() av_clear(cx->blk_sub.argarray)
-#else
-# define CLEAR_ARGARRAY() NOOP
-#endif /* USE_ITHREADS */
-
+/* junk in @_ spells trouble when cloning CVs and in pp_caller(), so don't
+ * leave any */
+#define CLEAR_ARGARRAY() av_clear(cx->blk_sub.argarray)
#define POPSUB(cx,sv) \
STMT_START { \
diff --git a/gnu/usr.bin/perl/patchlevel.h b/gnu/usr.bin/perl/patchlevel.h
index 645620d799b..e98313b3f73 100644
--- a/gnu/usr.bin/perl/patchlevel.h
+++ b/gnu/usr.bin/perl/patchlevel.h
@@ -71,6 +71,7 @@
static char *local_patches[] = {
NULL
,"SUIDMAIL - fixes for suidperl security"
+ ,"CHANGE6214 - fixes a coredump in @DB::args"
,NULL
};
diff --git a/gnu/usr.bin/perl/t/op/runlevel.t b/gnu/usr.bin/perl/t/op/runlevel.t
index e988ad9362a..3865e52070d 100644
--- a/gnu/usr.bin/perl/t/op/runlevel.t
+++ b/gnu/usr.bin/perl/t/op/runlevel.t
@@ -349,3 +349,18 @@ A 1
bar
B 2
bar
+########
+sub n { 0 }
+sub f { my $x = shift; d(); }
+f(n());
+f();
+
+sub d {
+ my $i = 0; my @a;
+ while (do { { package DB; @a = caller($i++) } } ) {
+ @a = @DB::args;
+ for (@a) { print "$_\n"; $_ = '' }
+ }
+}
+EXPECT
+0