In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/67a38f64602c1e8bbf6b6e5d21455c3f5df90f01?hp=792e46564870a460524a90be0cffedd5dcc9e032>
- Log ----------------------------------------------------------------- commit 67a38f64602c1e8bbf6b6e5d21455c3f5df90f01 Author: Tony Cook <[email protected]> Date: Thu Apr 16 09:51:03 2015 +1000 bump perl5db.pl's $VERSION M lib/perl5db.pl commit f80262130b14af7d62281372d55e93f84e2a16b7 Author: Tony Cook <[email protected]> Date: Thu Apr 16 09:50:48 2015 +1000 James McCoy is now a perl AUTHOR M AUTHORS commit 41ef2c66e0da6dfb04ded81b979f7081007a1add Author: James McCoy <[email protected]> Date: Thu Mar 19 22:55:18 2015 -0400 lib/perl5db.pl: Restore noop lock prototype cde405a6b9b86bd8110f63531b42d89590a4c56e removed the lock prototype "because it's already a do-nothing weak keyword without threads". However, that causes "perl -d threaded-script.pl" to complain lock can only be used on shared values at /usr/share/perl/5.20/perl5db.pl line 4101. BEGIN failed--compilation aborted at threaded-script.pl line 2. lock can only be used on shared values at /usr/share/perl/5.20/perl5db.pl line 2514. END failed--call queue aborted at threaded-script.pl line 2. Unbalanced scopes: 3 more ENTERs than LEAVEs because threaded-script.pl's importing of threads::shared enable's lock()'s non-noop behavior. Restoring the lock() prototype fixes the inconsistency between lock() and share() usage. Signed-off-by: James McCoy <[email protected]> M lib/perl5db.pl commit 902d16915db2735c3a41f15ef8d95cf300c31801 Author: Tony Cook <[email protected]> Date: Tue Apr 14 15:59:03 2015 +1000 [perl #124127] fix cloning arrays with unused elements ce0d59fd changed arrays to use NULL instead of &PL_sv_undef for unused elements, unfortunately it missed updating sv_dup_common()'s initialization of unused elements, leaving them as &PL_sv_undef. This resulted in modification of read only value errors at runtime. M sv.c M t/op/threads.t ----------------------------------------------------------------------- Summary of changes: AUTHORS | 1 + lib/perl5db.pl | 3 ++- sv.c | 2 +- t/op/threads.t | 8 +++++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9326d21..38e0812 100644 --- a/AUTHORS +++ b/AUTHORS @@ -525,6 +525,7 @@ James FitzGibbon <[email protected]> James Jurach <[email protected]> James E Keenan <[email protected]> James Mastros <[email protected]> +James McCoy <[email protected]> James Raspass <[email protected]> Jamshid Afshar Jan D. <[email protected]> diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 8babb45..7e7194e 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -528,7 +528,7 @@ BEGIN { # Debugger for Perl 5.00x; perl5db.pl patch level: use vars qw($VERSION $header); -$VERSION = '1.48'; +$VERSION = '1.49'; $header = "perl5db.pl version $VERSION"; @@ -871,6 +871,7 @@ BEGIN { lock($DBGR); print "Threads support enabled\n"; } else { + *lock = sub(*) {}; *share = sub(\[$@%]) {}; } } diff --git a/sv.c b/sv.c index 467dc24..2bb0346 100644 --- a/sv.c +++ b/sv.c @@ -13641,7 +13641,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) } items = AvMAX((const AV *)sstr) - AvFILLp((const AV *)sstr); while (items-- > 0) { - *dst_ary++ = &PL_sv_undef; + *dst_ary++ = NULL; } } else { diff --git a/t/op/threads.t b/t/op/threads.t index 6fb2410..e76c956 100644 --- a/t/op/threads.t +++ b/t/op/threads.t @@ -9,7 +9,7 @@ BEGIN { skip_all_without_config('useithreads'); skip_all_if_miniperl("no dynamic loading on miniperl, no threads"); - plan(27); + plan(28); } use strict; @@ -399,4 +399,10 @@ fresh_perl_is( 'no crash when deleting $::{INC} in thread' ); +fresh_perl_is(<<'CODE', 'ok', 'no crash modifying extended array element'); +use threads; +my @a = 1; +threads->create(sub { $#a = 1; $a[1] = 2; print qq/ok\n/ })->join; +CODE + # EOF -- Perl5 Master Repository
