This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
11 years agovalid_utf8_to_uv{chr,uni} have no documentation, so remove the 'd' flag.
Nicholas Clark [Thu, 12 Apr 2012 16:27:59 +0000 (18:27 +0200)]
valid_utf8_to_uv{chr,uni} have no documentation, so remove the 'd' flag.

Commit 27d6c58a7e12243b added valid_utf8_to_uv{chr,uni} with the commit
message:

    utf8.c: Add valid_utf8_to_uvuni() and valid_utf8_to_uvchr()

    These functions are like utf8_to_uvuni() and utf8_to_uvchr(), but their
    name implies that the input UTF-8 has been validated.

    They are not currently documented, as it's best for XS writers to call
    the functions that do validation.

However, it also inadvertently gave each a 'd' flag in embed.fnc, incorrectly
stating that they had documentation, which causes autodoc.pl to warn that it
can't find the documentation.

So remove the 'd' flag to correctly reflect the intended lack of documentation.

11 years agoFix version tests on windoze
Father Chrysostomos [Wed, 18 Apr 2012 00:16:12 +0000 (17:16 -0700)]
Fix version tests on windoze

This is a follow-up to commit 78e230aef16b.

When there is an integer overflow (which itself produces a warning),
the resulting behaviour with version objects is basically undefined.
Hence, this newly-added test, which was actually just there to make
sure there was no panic, failed.

11 years agoDon’t produce uninit warning for ->VERSION(9e99)
Father Chrysostomos [Wed, 18 Apr 2012 00:14:14 +0000 (17:14 -0700)]
Don’t produce uninit warning for ->VERSION(9e99)

This is a follow-up to commit 78e230aef16b.

It was using a temporary undef scalar and concatenating to it instead
of setting it, triggering the warning.

I haven’t added tests, out of paranoia.

11 years agoPATCH: [perl #111338] Warnings in utf8 subcategories do nothing in isolation
Karl Williamson [Mon, 5 Mar 2012 17:34:05 +0000 (10:34 -0700)]
PATCH: [perl #111338] Warnings in utf8 subcategories do nothing in isolation

This was the result of assuming that these would not be on unless
the main category was also on.

11 years agoCorrect INSTALL to warn about editing cflags, not cflags.SH
Nicholas Clark [Wed, 28 Mar 2012 14:57:13 +0000 (16:57 +0200)]
Correct INSTALL to warn about editing cflags, not cflags.SH

Commit 668cbedd4fc8e9b2 in Nov 2011, as part of a much larger set of edits
and corrections, inadvertently changed 'cflags' to 'cflags.SH', which is
not correct in context.

11 years ago[perl #112478] Avoid buffer overflow in upg_version
Father Chrysostomos [Tue, 17 Apr 2012 03:24:45 +0000 (20:24 -0700)]
[perl #112478] Avoid buffer overflow in upg_version

On most systems, this is actually a panic, rather than an overflow,
because the overflow is detected before it can happen.

upg_version needs to use the equivalent of sprintf "%.9f" on a numeric
input before parsing it.  For speed’s sake, I assume, it was done
using my_snprintf, with a C auto for the buffer, declared with a fixed
size of 64.

There is no guarantee that the number passed in will not overflow that
buffer, so upg_version should use an SV and sv_catpvf in those cases
where it would overflow.

11 years agoINSTALL doc changes because of TestInit.pm movement
Slaven Rezic [Wed, 21 Mar 2012 19:59:46 +0000 (20:59 +0100)]
INSTALL doc changes because of TestInit.pm movement

commit 30b6e59101b252c20a6b50b95203d1e2c6016604 moved TestInit.pm from
t to top level.

11 years agoSITELIB_EXP may be NULL on Windows
Jan Dubois [Wed, 4 Apr 2012 00:15:59 +0000 (17:15 -0700)]
SITELIB_EXP may be NULL on Windows

The sitelib directory is located dynamically at runtime by checking
for the ../site path relative to the location of perl5xx.dll.  This
directory doesn't exist at buildtime, so calling strlen(NULL) may
cause an access violation...

11 years ago[perl #112444] Don’t leak %^H autovivified by destructor
Father Chrysostomos [Mon, 16 Apr 2012 05:01:26 +0000 (22:01 -0700)]
[perl #112444] Don’t leak %^H autovivified by destructor

More precisely, don’t let a hint hash autovivified by a destructor
during scope exit leak to outer scopes.

GvHV(PL_hintgv) (aka *^H{HASH}) must be set to null before the hash in
it is freed on scope exit.  Otherwise destructors will see %^H with a
refcount of zero, and might try to iterate over a hash that is in the
process of being freed.  Bad things then happen.  Commit 2653c1e3b1
took care of this.

Now, if GvHV(PL_hintgv) is null when destructors are called, those
destructors might end up autovivifying it.  The code in scope.c that
handles hints when a scope is left (SAVEt_HINTS in Perl_leave_scope)
would then end up leaving that new autovivified %^H in place when the
scope exited, if the outer scope did not have HINT_LOCALIZE_HH set
(meaning %^H was unused).

That in itself would not be so much of a problem, if it were not for
the fact that %^H is magicalised by the scope-handling code, not when
it is autovivified (see also bug #112458).  Hence, subsequent changes
to %^H would not magically set the HINT_LOCALIZE_HH hint bit, which
bit is checked all over the place to see whether %^H is in use.  This,
in turn, would cause hints subsequently added to %^H to leak to
outer scopes.

This commit fixes that by repeatedly freeing GvHV(PL_hintgv).  If a
destructor autovivifies it again, it just causes another iteration of
the while loop.  This does mean a destructor could autovivify %^H and
cause the new %^H itself to trigger a destructor, resulting in infi-
nite loops.  But then that is that own code’s fault.

This originally came up because commit 2653c1e3b1 also caused des-
tructors that try to add new free magic to %^H to add it to a new
autovivified %^H instead of the existing %^H that was being freed.
This caused the nextgen module to fail its tests, because it uses
B::Hooks::EndOfScope to register a sub to be called on scope exit, and
it does this from a destructor itself called during scope exit.  If
the autovivified %^H leaks to an outer scope, the second destructor is
not called.

11 years agomake Pod-Html's _unixify normalize Win32 drive letters
Ricardo Signes [Mon, 16 Apr 2012 01:31:08 +0000 (21:31 -0400)]
make Pod-Html's _unixify normalize Win32 drive letters

Okay, look, this is kind of stupid and horrible, but it should
stop smoke failures and actually address some forms of failed path
comparisons in Pod::Html.  In reality, we should be doing better path
comparisons than checking substr and eq, but that's not going to get
properly overhauled at this late date.

In the meantime, this should fix Win32 smokers with forcibly lc()-ed
cwds without breaking anybodye else, right?  Right!

11 years agofix [perl #112370] memEQ off-by-one in Perl_regexec_flags()
Yves Orton [Sun, 15 Apr 2012 09:23:11 +0000 (11:23 +0200)]
fix [perl #112370] memEQ off-by-one in Perl_regexec_flags()

The problem was that when we had a floating non-unicode substr
we could read past the beginning of the string.

So for instance this code:

    foreach ("\x{2603}", 'a') {
        'b' =~ /(?:^|.)$_$/;
    }

When run under valgrind would show an illegal read.

If run under use re 'debug' we would see output like this:

    floating utf8 "a"$ at 0..1 (checking floating) minlen 1
    Matching REx "(?:^|.)a$" against "b"
    UTF-8 pattern...
    Can't trim the tail, match fails (should not happen)
    Match failed

Which suggests we are falling into a "should not happen" branch of the
code.

This patch fixes the logic to properly test string length issues, and
changes the debug output so it looks like this:

    floating utf8 "a"$ at 0..1 (checking floating) minlen 1
    Matching REx "(?:^|.)a$" against "b"
    UTF-8 pattern...
    String does not contain required trailing substring, cannot match.
    Match failed

Which makes more sense.

11 years agoAdd an assert related to [perl #112370] memEQ off-by-one in Perl_regexec_flags()
Yves Orton [Sun, 15 Apr 2012 09:22:29 +0000 (11:22 +0200)]
Add an assert related to [perl #112370] memEQ off-by-one in Perl_regexec_flags()

This probably breaks tests under DEBUGGING, but it should also make this
codepath more robust to future changes. It seems to pass all tests.

Follow up patch fixes one cause of this assert being utilized.

11 years agoop/sigdispatch.t: skip tests on prodn releases
David Mitchell [Sat, 14 Apr 2012 09:28:35 +0000 (10:28 +0100)]
op/sigdispatch.t: skip tests on prodn releases

RT #89718 showed a couple of tests hanging on old linux kernels.
Until such time as someone can reliably probe for this, just
completely skip those tests on production releases.

11 years ago[perl #110736] warnings from cpan/IO-Compress/t/cz-03zlib-v1.t
Chris 'BinGOs' Williams [Fri, 23 Mar 2012 17:07:24 +0000 (17:07 +0000)]
[perl #110736] warnings from cpan/IO-Compress/t/cz-03zlib-v1.t

Backported t/cz-03zlib-v1.t from IO-Compress-2.049

11 years agoTweak the FEATURE_IS_ENABLED() macro to avoid a bug in the HP-UX compiler.
Nicholas Clark [Wed, 11 Apr 2012 14:47:27 +0000 (16:47 +0200)]
Tweak the FEATURE_IS_ENABLED() macro to avoid a bug in the HP-UX compiler.

11 years agostop %^H pointing to being-freed hash; #112326
David Mitchell [Wed, 11 Apr 2012 12:37:09 +0000 (13:37 +0100)]
stop %^H pointing to being-freed hash; #112326

The leave_scope() action SAVEt_HINTS does the following to
GvHV(PL_hintgv): first it SvREFCNT_dec()'s it, then sets it to NULL.
If the current %^H contains a destructor, then that will be
executed while %^H still points to the hash being freed.
This can cause bad things to happen, like iterating over the hash being
freed.

Instead, setGvHV(PL_hintgv) to NULL first, *then* free the hash.

11 years agoIncrease $attributes::VERSION to 0.19
Father Chrysostomos [Wed, 11 Apr 2012 04:50:03 +0000 (21:50 -0700)]
Increase $attributes::VERSION to 0.19

11 years agoPut bulk 88’s real name in AUTHORS
Father Chrysostomos [Wed, 11 Apr 2012 04:42:29 +0000 (21:42 -0700)]
Put bulk 88’s real name in AUTHORS

at his request

11 years agoRevert "doco improvement for attributes.pm"
Father Chrysostomos [Wed, 11 Apr 2012 04:41:33 +0000 (21:41 -0700)]
Revert "doco improvement for attributes.pm"

This reverts commit f29a7c30d92b9e3714cce5604d86fb97c1b099e8.

11 years ago[perl #112352] Make ‘use v5.15’ always enable unicode_eval
Father Chrysostomos [Wed, 11 Apr 2012 04:40:38 +0000 (21:40 -0700)]
[perl #112352] Make ‘use v5.15’ always enable unicode_eval

When the unicode_eval feature was added, the code for compiling an
eval was modified to check whether the feature was enabled, before
flagging the op.

For efficiency’s sake, since there was already a block that checked to
see whether %^H was localised (which happens automatically when it is
modified), and since features always used %^H, I put the check inside
that block, so it would be skipped altogether without %^H set.  (It’s
debatable whether it was actually any faster.)

Later, in commit 6634bb9d0ed1, when I changed implicit features to use
$^H, I didn’t update the eval code.  So it would only check to see
whether the feature was enabled if %^H was also enabled.

This fixes that by moving it below the %^H block.

11 years agoAdd bulk 88 to AUTHORS
Father Chrysostomos [Tue, 10 Apr 2012 21:52:29 +0000 (14:52 -0700)]
Add bulk 88 to AUTHORS

I would not have been able to do the previous commit without his help.

11 years ago[perl #109718] Clone PL_comppad properly
Father Chrysostomos [Tue, 10 Apr 2012 03:11:47 +0000 (20:11 -0700)]
[perl #109718] Clone PL_comppad properly

fork emulation on Windows, which clones a new thread via
perl_clone_using, expects to be able to access the current pad imme-
diately after the cloning, and crashes if there is no current pad.

PL_comppad was not being cloned explicitly, but simply looked up in
the pointer table, it being assumed that it had already been cloned.

For string evals, before commit 676a678, PL_compcv happened to point
to the eval’s CV.  PL_compcv is cloned just before PL_comppad is set,
so that worked.

As of commit 676a678, PL_compcv does not point to the eval’s CV
at the eval’s run time, so the pad has not been cloned yet when
PL_comppad is set.

In the case of string evals, the CV does get cloned, but later on,
after PL_comppad is set, when the stacks are cloned.

Changing the setting of PL_comppad to do an actual cloning works, as,
when the eval’s CV is cloned later (during stack cloning), it will
simply pick up the pad that has already been cloned and is waiting for
it in the pointer table.

This stops eval 'fork' from crashing on Windows.

11 years agoTest patch for version 0.97
John Peacock [Thu, 29 Mar 2012 02:22:22 +0000 (22:22 -0400)]
Test patch for version 0.97

I had some isolated test failures with 0.96 from BSDish systems with
limited locales installed.  The attached patch brings bleadperl in line
with the CPAN 0.97 release.  I'd like to see it get into 5.16 if
possible, so that we don't have needless test failures.

Thanks

John

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
11 years agoperl5160delta.pod: Add to-do note
Father Chrysostomos [Sun, 8 Apr 2012 06:10:27 +0000 (23:10 -0700)]
perl5160delta.pod: Add to-do note

11 years agoperl5160delta.pod: Lvalue sub bugfix section
Father Chrysostomos [Sun, 8 Apr 2012 05:58:11 +0000 (22:58 -0700)]
perl5160delta.pod: Lvalue sub bugfix section

Move all lv sub bug fixes into this section.  Tweak things a bit.

11 years agoperl5160delta.pod: Missing space
Father Chrysostomos [Sun, 8 Apr 2012 05:57:41 +0000 (22:57 -0700)]
perl5160delta.pod: Missing space

11 years agoperl5160delta.pod: Rewording
Father Chrysostomos [Sun, 8 Apr 2012 02:04:58 +0000 (19:04 -0700)]
perl5160delta.pod: Rewording

11 years agoperl5160delta.pod: Make diag changes somewhat alphabetical
Father Chrysostomos [Sun, 8 Apr 2012 02:01:07 +0000 (19:01 -0700)]
perl5160delta.pod: Make diag changes somewhat alphabetical

Alphabetized mostly by the text of the error message, even when it is
not given.

11 years agoperl5160delta.pod: Alphabetize new diagnostics
Father Chrysostomos [Sun, 8 Apr 2012 01:57:39 +0000 (18:57 -0700)]
perl5160delta.pod: Alphabetize new diagnostics

11 years agoperl5160delta.pod: Note that zipdetails is new
Father Chrysostomos [Sun, 8 Apr 2012 01:56:01 +0000 (18:56 -0700)]
perl5160delta.pod: Note that zipdetails is new

11 years agoperl5160delta.pod: Typos
Father Chrysostomos [Sun, 8 Apr 2012 01:54:42 +0000 (18:54 -0700)]
perl5160delta.pod: Typos

11 years agoperl5160delta.pod: Move ‘glob failed’ under Diagnostics
Father Chrysostomos [Sun, 8 Apr 2012 01:52:17 +0000 (18:52 -0700)]
perl5160delta.pod: Move ‘glob failed’ under Diagnostics

11 years agoperl5160delta.pod: Removed Errors, not Warnings
Father Chrysostomos [Sun, 8 Apr 2012 01:50:30 +0000 (18:50 -0700)]
perl5160delta.pod: Removed Errors, not Warnings

The only removed diagnostic was an error.

11 years agoperl5160delta.pod: Don’t list $[ deprecation msg
Father Chrysostomos [Sun, 8 Apr 2012 01:49:13 +0000 (18:49 -0700)]
perl5160delta.pod: Don’t list $[ deprecation msg

It was inadvertently removed and later restored, both in the
5.15.x series.

11 years agoperl5160delta.pod: Shorten $[ warning description
Father Chrysostomos [Sun, 8 Apr 2012 01:48:06 +0000 (18:48 -0700)]
perl5160delta.pod: Shorten $[ warning description

That last sentence is unnecessary.

11 years agoperl5160delta.pod: ‘Useless assignment’ rewording
Father Chrysostomos [Sun, 8 Apr 2012 01:47:06 +0000 (18:47 -0700)]
perl5160delta.pod: ‘Useless assignment’ rewording

It actually happens with any lvalue subroutines, not just XS, as in
‘+sub :lvalue { my $foo }->() = 3’.

11 years agoperl5160delta.pod: Format new errors consistently
Father Chrysostomos [Sun, 8 Apr 2012 01:43:53 +0000 (18:43 -0700)]
perl5160delta.pod: Format new errors consistently

11 years agoperl5160delta.pod: Improve wording
Father Chrysostomos [Sat, 7 Apr 2012 07:14:08 +0000 (00:14 -0700)]
perl5160delta.pod: Improve wording

11 years agoperl5160delta.pod: Don’t mention lvalue sub docs
Father Chrysostomos [Sat, 7 Apr 2012 07:12:40 +0000 (00:12 -0700)]
perl5160delta.pod: Don’t mention lvalue sub docs

This is implied by descriptions of the lvalue changes elsewhere.  And
the docs actually barely changed.

11 years agoperl5160delta.pod: Remove redundancy
Father Chrysostomos [Sat, 7 Apr 2012 07:09:20 +0000 (00:09 -0700)]
perl5160delta.pod: Remove redundancy

This is no longer relevant, as this has moved to a different document
now, as mentioned two items earlier.

11 years agoperl5160delta.pod: Small correction to glob speedup
Father Chrysostomos [Sat, 7 Apr 2012 07:03:25 +0000 (00:03 -0700)]
perl5160delta.pod: Small correction to glob speedup

11 years agoperl5160delta.pod: Remove =back/=over
Father Chrysostomos [Sat, 7 Apr 2012 07:02:50 +0000 (00:02 -0700)]
perl5160delta.pod: Remove =back/=over

11 years agoperl5160delta.pod: Move a fut. depr. to the right sect.
Father Chrysostomos [Sat, 7 Apr 2012 07:02:21 +0000 (00:02 -0700)]
perl5160delta.pod: Move a fut. depr. to the right sect.

11 years agoperl5160delta.pod: Improve punct
Father Chrysostomos [Sat, 7 Apr 2012 06:54:53 +0000 (23:54 -0700)]
perl5160delta.pod: Improve punct

These sections read better with a few more commas.

11 years agoperl5160delta.pod: Remove comment about 5.15.0
Father Chrysostomos [Sat, 7 Apr 2012 06:53:35 +0000 (23:53 -0700)]
perl5160delta.pod: Remove comment about 5.15.0

11 years agoperl5160delta.pod: Simplify $$ caching section
Father Chrysostomos [Sat, 7 Apr 2012 06:51:34 +0000 (23:51 -0700)]
perl5160delta.pod: Simplify $$ caching section

Add a more specific link, too.

11 years agoperl5160delta.pod: Grammar
Father Chrysostomos [Sat, 7 Apr 2012 06:46:50 +0000 (23:46 -0700)]
perl5160delta.pod: Grammar

11 years agoperl5160delta.pod: Condense *$io section
Father Chrysostomos [Sat, 7 Apr 2012 06:43:31 +0000 (23:43 -0700)]
perl5160delta.pod: Condense *$io section

11 years agoperl5160delta.pod: Typos
Father Chrysostomos [Sat, 7 Apr 2012 06:42:23 +0000 (23:42 -0700)]
perl5160delta.pod: Typos

11 years agoperl5160delta.pod: Move 2 similar sections closer
Father Chrysostomos [Sat, 7 Apr 2012 06:38:49 +0000 (23:38 -0700)]
perl5160delta.pod: Move 2 similar sections closer

Correct =head2 to =head3

11 years agoperl5160delta.pod: Make perl bug numbers more consistent
Father Chrysostomos [Sat, 7 Apr 2012 06:37:38 +0000 (23:37 -0700)]
perl5160delta.pod: Make perl bug numbers more consistent

11 years agoperl5160delta.pod: Remove coresubs bug fixes
Father Chrysostomos [Sat, 7 Apr 2012 06:32:39 +0000 (23:32 -0700)]
perl5160delta.pod: Remove coresubs bug fixes

11 years agoperl5160delta.pod: Update ‘&CORE::%s cannot...’
Father Chrysostomos [Sat, 7 Apr 2012 06:30:19 +0000 (23:30 -0700)]
perl5160delta.pod: Update ‘&CORE::%s cannot...’

11 years agoperl5160delta.pod: Rework the CORE section
Father Chrysostomos [Sat, 7 Apr 2012 06:28:27 +0000 (23:28 -0700)]
perl5160delta.pod: Rework the CORE section

11 years agoperl5160delta.pod: Spaces after dots
Father Chrysostomos [Sat, 7 Apr 2012 06:14:38 +0000 (23:14 -0700)]
perl5160delta.pod: Spaces after dots

and one missing dot

11 years agoperl5160delta.pod: Remove redundant entries
Father Chrysostomos [Sat, 7 Apr 2012 06:08:21 +0000 (23:08 -0700)]
perl5160delta.pod: Remove redundant entries

Constant subroutine names (which are null-clean now) are included
under typeglob names.  Package names returned by caller are covered
by ‘Package names’.

11 years agoperl5160delta.pod: Typos
Father Chrysostomos [Sat, 7 Apr 2012 06:05:47 +0000 (23:05 -0700)]
perl5160delta.pod: Typos

11 years agoFix for perl #112316: Wrong behavior regarding labels with same prefix
Brian Fraser [Fri, 6 Apr 2012 20:47:14 +0000 (17:47 -0300)]
Fix for perl #112316: Wrong behavior regarding labels with same prefix

The code that compared non UTF-8 labels neglected to check that
the label's length was equal before comparing them with a memEQ,
which lead to code that used labels with the same prefixes to fail:

./perl -Ilib -E 'CATCH: { CATCHLOOP: { last CATCH;  } die  }'

11 years agoadd a missing colon to a code snippet in perlfunc
Ricardo Signes [Fri, 6 Apr 2012 18:06:49 +0000 (14:06 -0400)]
add a missing colon to a code snippet in perlfunc

11 years agoperl5160delta.pod: ‘glob failed’ is suppressible
Father Chrysostomos [Fri, 6 Apr 2012 13:29:31 +0000 (06:29 -0700)]
perl5160delta.pod: ‘glob failed’ is suppressible

This is a post-5.15.9 change.

11 years agoperl5160delta.pod: #111842
Father Chrysostomos [Fri, 6 Apr 2012 13:28:04 +0000 (06:28 -0700)]
perl5160delta.pod: #111842

11 years agoperl5160delta.pod: double space
Father Chrysostomos [Fri, 6 Apr 2012 05:57:53 +0000 (22:57 -0700)]
perl5160delta.pod: double space

11 years agoperl5160delta.pod: Add more 5.15.9 stuff
Father Chrysostomos [Fri, 6 Apr 2012 05:57:07 +0000 (22:57 -0700)]
perl5160delta.pod: Add more 5.15.9 stuff

This remains:

    a40630bf5c45 #111842

and these entries from perl5159delta:

    =head1 Security

    =head2 Malformed UTF-8 input could cause attempts to read beyond the
    end of the buffer

    Two new XS-accessible functions, C<utf8_to_uvchr_buf()> and
    C<utf8_to_uvuni_buf()> are now available to prevent this, and the Perl
    core has been converted to use them.
    See L</Internal Changes>.

    =head1 Deprecations

    =head2 XS functions C<utf8_to_uvchr()> and C<utf8_to_uvuni()>

    Use C<utf8_to_uvchr_buf()> and C<utf8_to_uvuni_buf()> instead.
    See L</Internal Changes>.

11 years agoperl5160delta.pod: Document ‘no feature’ changes
Father Chrysostomos [Fri, 6 Apr 2012 05:43:45 +0000 (22:43 -0700)]
perl5160delta.pod: Document ‘no feature’ changes

and also the ‘:all’ bundle, copied from perl5159delta.

11 years agoperl5160delta.pod: Clarify Cygwin::sinc_winenv addition
Father Chrysostomos [Fri, 6 Apr 2012 05:19:42 +0000 (22:19 -0700)]
perl5160delta.pod: Clarify Cygwin::sinc_winenv addition

11 years agoperl5160delta.pod: Make bug numbers greppable
Father Chrysostomos [Fri, 6 Apr 2012 05:15:48 +0000 (22:15 -0700)]
perl5160delta.pod: Make bug numbers greppable

11 years agoperl5160delta.pod: Mention !$^V leak
Father Chrysostomos [Fri, 6 Apr 2012 05:15:13 +0000 (22:15 -0700)]
perl5160delta.pod: Mention !$^V leak

This was omitted from 5.15.8’s delta.

11 years agoAdd Christopher Madsen to AUTHORS
Father Chrysostomos [Thu, 5 Apr 2012 13:18:22 +0000 (06:18 -0700)]
Add Christopher Madsen to AUTHORS

11 years ago[perl #112248] Fix typos in perl515*delta
Christopher J. Madsen [Thu, 5 Apr 2012 13:17:13 +0000 (06:17 -0700)]
[perl #112248] Fix typos in perl515*delta

11 years agoFix VMS build broken by d1718a7cf5
Father Chrysostomos [Thu, 5 Apr 2012 05:22:53 +0000 (22:22 -0700)]
Fix VMS build broken by d1718a7cf5

This comment in perl.c:

/* Note: 20,40,80 used for NATIVE_HINTS */

(added by a0ed51b3 [Here are the long-expected Unicode/UTF-8 mod-
ifications.]), has apparently always been wrong.  The values in
vms/vmsish.h end with 7 zeroes in hex, and are only shifted down to
one zero when assigned to cop->op_private in op.c:newSTATEOP.  In
PL_hints they never have the values indicated in perl.h.  So those
are actually free bits.  It’s the high versions in vmsish.h that
are not free.

20 (actually 0x20000000) hasn’t been used for anything since commit
744a34f9085 (Urk -- undo previous removal of vmsish 'exit' change),
which change I don’t really understand.  In any case, the comment was
never updated.

This comment in op.h:

/* NOTE: OP_NEXTSTATE and OP_DBSTATE (i.e. COPs) carry lower
 * bits of PL_hints in op_private */

was added by d41ff1b8ad98 (introduce $^U), which was later reverted.
op_private does not carry the lower bits of PL_hints, but, rather,
certain higher bits of PL_hints, shifted to fit (the NATIVE_HINTS
cited above).

Due to misleading comments, I ended up breaking the VMS build in com-
mit d1718a7cf5, by using its bits for something else.

This commit moves the bits around a bit to avoid the clash, and modi-
fies the comments to reflect reality.

11 years agoUnicode::UCD.pm: Bump version
Karl Williamson [Wed, 4 Apr 2012 20:47:59 +0000 (14:47 -0600)]
Unicode::UCD.pm: Bump version

11 years agoperlunicode: Remove out-dated text
Karl Williamson [Thu, 29 Mar 2012 03:00:13 +0000 (21:00 -0600)]
perlunicode: Remove out-dated text

This promised feature never fully worked, as some things have always
been compiled into perl, and just changing an environment variable won't
change that.  In 5.16, even more things are compiled-in, so this is even
more broken

11 years agoUnicode::UCD::prop_invmap(): Return 's' not 'i' format
Karl Williamson [Thu, 29 Mar 2012 02:43:58 +0000 (20:43 -0600)]
Unicode::UCD::prop_invmap(): Return 's' not 'i' format

The 'i' is an earlier name, and I overlooked changing it when the other
formats were changed.  In Unicode 6.1, the only property that is
affected is Bmg.

11 years agoDecrease $Safe::VERSION to 2.31_01
Father Chrysostomos [Tue, 3 Apr 2012 15:51:14 +0000 (08:51 -0700)]
Decrease $Safe::VERSION to 2.31_01

There has been a release of 2.32 on CPAN with changes that are not in
blead.  So what bleadperl has is 2.31 plus a tiny fix that does not
affect older perl versions.

11 years ago[perl #111462] Move strict hints from %^H to $^H
Father Chrysostomos [Sat, 31 Mar 2012 20:50:04 +0000 (13:50 -0700)]
[perl #111462] Move strict hints from %^H to $^H

With commit b50b20584, strict.pm starting putting hints in %^H to
indicate that strict mode has been enabled or disabled explicitly, so
version declarations should not change the setting.

This causes ‘Unbalanced string table refcount’ warnings when Safe.pm
encounters prohibited ops.

This happens because ops are leaking when those ops point to HEKs (in
the internal form that %^H takes when attached to ops).

This commit moves those new strict hints into $^H, to avoid those
warnings.  This does simply paper over the real problem (leaked ops),
but at least it gets the warnings back down to the 5.14 amount.

Because of the new hints in $^H, B::Concise has been updated to
account for them, and so have all its tests.  I modified OptreeCheck
to avoid setting the hints with ‘no strict;’, as that resulted in
slightly fewer changes to the tests.  It will also result in fewer
changes to the tests in future.

Two B::Deparse tests started failing due to %^H not being localised.
Apparently there is a bug somewhere (in perl, Deparse.pm or deparse.t)
that got triggered as a result.  In fact, one of the tests exhibited
*two* bugs.  But for now, I’ve simply added a workaround to the two
tests so they don’t trigger those bugs (which bugs will have to wait
till after 5.16).

11 years agoMaintainers.pl: Make blead upstream for B::Concise
Father Chrysostomos [Tue, 3 Apr 2012 05:13:11 +0000 (22:13 -0700)]
Maintainers.pl: Make blead upstream for B::Concise

‘undef’ (its previous value) means that it hasn’t been discussed yet.
But, for all intents and purposes, this module is maintained in blead,
since it is very tightly coupled with the perl core and is used mostly
in debugging perl itself.

What’s annoying about having it set to ‘undef’ is that
t/porting/cmp_version.t skips it.

(I almost forgot to update a version as a result.)

11 years agoIncrease $B::Concise::VERSION to 0.89
Father Chrysostomos [Tue, 3 Apr 2012 05:13:59 +0000 (22:13 -0700)]
Increase $B::Concise::VERSION to 0.89

11 years agoIncrease $OptreeCheck::VERSION to 0.07
Father Chrysostomos [Tue, 3 Apr 2012 05:01:51 +0000 (22:01 -0700)]
Increase $OptreeCheck::VERSION to 0.07

I am still baffled as to why this module needs a version.

11 years agoIncrease $B::Deparse::VERSION to 1.14
Father Chrysostomos [Sat, 31 Mar 2012 20:33:42 +0000 (13:33 -0700)]
Increase $B::Deparse::VERSION to 1.14

11 years agoIncrease $strict::VERSION to 1.07
Father Chrysostomos [Sat, 31 Mar 2012 20:33:33 +0000 (13:33 -0700)]
Increase $strict::VERSION to 1.07

11 years agoUpstream pkgsrc patch to support NetBSD 6.*
Chris 'BinGOs' Williams [Mon, 2 Apr 2012 19:19:52 +0000 (20:19 +0100)]
Upstream pkgsrc patch to support NetBSD 6.*

From original patch:

"NetBSD-6.x is same condition as older releases."

11 years agoDetermine if ELF even if ld is not ''
H.Merijn Brand [Sun, 1 Apr 2012 10:01:30 +0000 (12:01 +0200)]
Determine if ELF even if ld is not ''

11 years agoSafe.pm: Don’t eval code under ‘no strict’
Father Chrysostomos [Sat, 31 Mar 2012 20:17:40 +0000 (13:17 -0700)]
Safe.pm: Don’t eval code under ‘no strict’

Instead of evaluating code under ‘no strict’, we should be evaluating
it with no pragmata at all by default.

This allows ‘use 5.012’ to enable strictures in reval.  It also
has the side effect of suppressing the ‘Unbalanced string table
refcount’ warnings, at least in some cases.  This was brought up in
ticket #107000.

11 years agoConvert safeops.t to test.pl
Father Chrysostomos [Sat, 31 Mar 2012 18:35:11 +0000 (11:35 -0700)]
Convert safeops.t to test.pl

For the sake of tests in the next commit, it needs runperl(), which
test.pl provides.  Since this script is only run in the perl core, it
should be fine.

11 years agoIncrease $Safe::VERSION to 2.32
Father Chrysostomos [Sat, 31 Mar 2012 16:51:08 +0000 (09:51 -0700)]
Increase $Safe::VERSION to 2.32

11 years agoReinstate dummy ignoredpods functionality
Rafael Garcia-Suarez [Sat, 31 Mar 2012 14:48:24 +0000 (16:48 +0200)]
Reinstate dummy ignoredpods functionality

The stub manpages (perlboot, perltoot, etc.) are listed in perl.pod,
so they don't need to be ignored by buildtoc. They weren't ignored
anyway, since the %ignoredpods hash was, well, ignored.

11 years agoAdd ld_can_script probe to Configure
H.Merijn Brand [Sat, 31 Mar 2012 14:31:29 +0000 (16:31 +0200)]
Add ld_can_script probe to Configure

With this new probe, requested by rafl, we could start building perl as
it would be built on OSs like AIX and Windows and actually test visibility
of the API and thus early detect if tests would fail on these restrictive
OSs

11 years agoAdd perltodo in the list of ignored pods
Rafael Garcia-Suarez [Sat, 31 Mar 2012 14:16:09 +0000 (16:16 +0200)]
Add perltodo in the list of ignored pods

(like the other obsolete manpage placeholders)

11 years agoUpdate base.pm's Changes file from the perldeltas
Rafael Garcia-Suarez [Sat, 31 Mar 2012 10:11:51 +0000 (12:11 +0200)]
Update base.pm's Changes file from the perldeltas

11 years agoRemove test for a functionality that was removed
Rafael Garcia-Suarez [Sat, 31 Mar 2012 10:10:36 +0000 (12:10 +0200)]
Remove test for a functionality that was removed

(this wasn't found earlier because this test file is only
run with perls <= 5.8.x)

11 years agoAdjust skip condition of tests for fields.pm to cover 5.14.*
Rafael Garcia-Suarez [Sat, 31 Mar 2012 09:27:05 +0000 (11:27 +0200)]
Adjust skip condition of tests for fields.pm to cover 5.14.*

and improve diagnostics

11 years agoTypo fix in the list of maintainers
Rafael Garcia-Suarez [Sat, 31 Mar 2012 08:55:12 +0000 (10:55 +0200)]
Typo fix in the list of maintainers

11 years agoShow maintainer name in corecpan output
Rafael Garcia-Suarez [Sat, 31 Mar 2012 08:54:51 +0000 (10:54 +0200)]
Show maintainer name in corecpan output

11 years agoutf8.c: Add back inadvertently deleted pod text
Karl Williamson [Tue, 20 Mar 2012 15:25:09 +0000 (09:25 -0600)]
utf8.c: Add back inadvertently deleted pod text

This was deleted by mistake in commit
4b88fb76efce8c436e63b907c9842345d4fa77c7

11 years agoUse remove more uses of utf8_to_uvchr()
Karl Williamson [Wed, 21 Mar 2012 23:30:05 +0000 (17:30 -0600)]
Use remove more uses of utf8_to_uvchr()

Commit 4b88fb76efce8c436e63b907c9842345d4fa77c7 missed 2 occurrences of
this, one of which is #ifdef'd out.

11 years agoUpdate Maintainers.pl for version-0.96
Chris 'BinGOs' Williams [Thu, 29 Mar 2012 09:09:37 +0000 (10:09 +0100)]
Update Maintainers.pl for version-0.96

11 years ago[perl #111864] Don’t leave obj on stack for -x $overloaded
Father Chrysostomos [Thu, 29 Mar 2012 06:38:05 +0000 (23:38 -0700)]
[perl #111864] Don’t leave obj on stack for -x $overloaded

Commit 8db8f6b697e changed the way filetest operators use the stack,
in order to make stacked -t work.

Filetest operators were changed to pop the argument off the stack for
a standalone operator, but to leave it on the stack for a stacking op
(so the next operator could use it).  The code for handling overloaded
objects, which was separate, was already doing something similar, by
not popping the object off the stack.

I made the mistake of changing overloaded objects’ return code to
share code with regular filetest operators (the FT_RETURN_* macros),
but without changing the way the overload code got the item from the
stack to begin with.  Hence, the returning code assumed that the argu-
ment had been popped for non-stacking ops, which was not the case.

This commit changes the way the overload case does it’s return, to
account for the fact that the object must be left on the stack when
initially fetched from it (in case the object turns out not to have -X
overloading and the regular code has to kick in).

11 years agouni/parser.t: Don’t test for explicit eval number
Father Chrysostomos [Wed, 28 Mar 2012 15:55:47 +0000 (08:55 -0700)]
uni/parser.t: Don’t test for explicit eval number

A different ‘(eval xxx)’ number was being emitted under miniperl.

11 years agoCorrect minitest skip count in uni/labels.t
Father Chrysostomos [Wed, 28 Mar 2012 15:50:41 +0000 (08:50 -0700)]
Correct minitest skip count in uni/labels.t

11 years ago[perl #111462] Don’t leak eval "" op tree when croaking
Father Chrysostomos [Wed, 28 Mar 2012 05:38:01 +0000 (22:38 -0700)]
[perl #111462] Don’t leak eval "" op tree when croaking

This patch only fixes the problem for croaks that occur in the peep-
hole optimiser or in Perl_finalize_optree.

It does this by doing SAVEFREEOP first and then restoring the
savestack index to its previous value afterwards (to void the effect
of SAVEFREEOP).

A more correct fix might be to do op_free in die_unwind before
POPEVAL, but I would have to do a lot more digging through the code
to tell whether that is safe.  I don’t feel comfortable with doing
that for 5.16.

This leak causes this warning on non-threaded debugging builds:

$ PERL_DESTRUCT_LEVEL=1 ./perl -Ilib -e 'BEGIN { $^H{foo} = bar } our %FIELDS; my main $x; eval q[$x->{foo}]'
Unbalanced string table refcount: (1) for "foo" during global destruction.

This problem does not affect the main program, because perl_destruct
frees PL_main_root.  It does not affect subroutines, as the op tree is
attached to the CV first, so freeing the CV frees the op tree.