Chris 'BinGOs' Williams [Tue, 27 Aug 2013 19:17:24 +0000 (20:17 +0100)]
Module-Build wasn't listed as DEPRECATED
Chris 'BinGOs' Williams [Tue, 27 Aug 2013 12:04:44 +0000 (13:04 +0100)]
Update ExtUtils-MakerMaker to CPAN version 6.74
[DELTA]
6.74 Tue Aug 27 12:43:05 BST 2013
No changes from 6.73_12
6.73_12 Fri Aug 23 10:49:13 BST 2013
Bug Fixes:
* Preserve runtime requires when PREREQ_PM argument is empty or undef
(miyagawa)
* RT#88037 regen run of Makefile.PL will use same -MCross arg as
initial .PL run (bulk88)
6.73_11 Sat Aug 17 22:51:14 BST 2013
Bug Fixes:
* RT#87911 prepend SUFFIX with a '.' if one isn't supplied
6.73_10 Fri Aug 16 16:40:09 BST 2013
Bug Fixes:
* RT#87839 resolve bootstrap problems when required prereqs
are missing
6.73_09 Fri Aug 9 19:58:32 BST 2013
Bug Fixes:
* Bundle code from Text::ParseWords to handle splitting
PERL_MM_OPT (actually removing Text::ParseWords this time).
6.73_08 Fri Aug 9 19:49:27 BST 2013
Bug Fixes:
* Bundle code from Text::ParseWords to handle splitting
PERL_MM_OPT.
6.73_07 Wed Aug 7 16:07:04 BST 2013
Bug Fixes:
* Set ACTIVEPERL_CONFIG_SILENT=1 during tests to make
ActivePerl less vocal about things
6.73_06 Tue Aug 6 00:50:08 BST 2013
New features:
* RT#70201 replace -M with Time::HiRes::stat
Bug Fixes:
* Split PERL_MM_OPT like a shell would, instead of split ' '
Win32 Fixes:
* Correct an oversight with Liblist Kid fix
6.73_05 Mon Aug 5 17:44:00 BST 2013
Win32 fixes:
* Fix hash randomisation problems with Liblist Kid
6.73_04 Thu Aug 1 22:34:31 BST 2013
Doc fixes:
* Corrected example for PM => {}
6.73_03 Tue Jul 30 22:09:52 BST 2013
Bug Fixes:
* Fix clean_subdirs target that was generating
warning on BSD
6.73_02 Fri Jul 26 13:32:43 BST 2013
Misc:
* Updated bundled Parse::CPAN::Meta
6.73_01 Wed Jul 24 23:49:56 BST 2013
Bug Fixes:
* Robustified parse_version()
Steve Hay [Tue, 27 Aug 2013 12:06:20 +0000 (13:06 +0100)]
perldelta - Start noting module upgrades and new test files
Steve Hay [Tue, 27 Aug 2013 12:05:47 +0000 (13:05 +0100)]
perldelta - Add missing =item directive
Father Chrysostomos [Tue, 27 Aug 2013 06:21:26 +0000 (23:21 -0700)]
[perl #119311] Keep CvDEPTH and savestack in sync
when unwinding sub and format calls.
The comments in the added test file explain what the problem is.
The fix is to call LEAVE_SCOPE in POPSUB and POPFORMAT (to free their
lexicals) before lowering CvDEPTH.
If the context has already been popped via cxstack_ix--, then
LEAVE_SCOPE could overwrite it, so accessing cx after LEAVE_SCOPE is
unsafe. Hence the changes to POPSUB and POPFORMAT are a bit involved.
Some callers of POPSUB do a temporary cxstack_ix++ first so they
can access cx afterwards. Two cases needed to be changed to
work that way.
Tony Cook [Tue, 27 Aug 2013 05:13:00 +0000 (15:13 +1000)]
[perl #119351] the test note isn't a note but an object description
avoid:
ok 239 - GV on a lexical sub isa B::SPECIAL isa B::SPECIAL
Ricardo Signes [Mon, 26 Aug 2013 21:55:28 +0000 (17:55 -0400)]
release schedule: Steve Hay will release in 2013-09
Tony Cook [Mon, 26 Aug 2013 06:41:20 +0000 (16:41 +1000)]
Tony Cook [Mon, 26 Aug 2013 06:32:48 +0000 (16:32 +1000)]
[perl #85104] save platform specific error code across signal handlers
This was previously done for VMS, add it (tested) for Win32 and
(untested) for OS/2.
Tony Cook [Mon, 26 Aug 2013 05:07:44 +0000 (15:07 +1000)]
[perl #85104] work harder to save error numbers
Updates the errno save macros to save the platform error number where
needed for more than just VMS.
The OS/2 code is untested.
Tony Cook [Mon, 26 Aug 2013 05:32:36 +0000 (15:32 +1000)]
[perl #85104] TODO test for preserving $^E across signal handlers
and tests Win32 signal emulation too
Tony Cook [Mon, 26 Aug 2013 04:35:17 +0000 (14:35 +1000)]
Tony Cook [Mon, 26 Aug 2013 04:34:41 +0000 (14:34 +1000)]
fix a type in the find2perl perldelta entry
Tony Cook [Mon, 26 Aug 2013 01:26:19 +0000 (11:26 +1000)]
[perl #117265] safesyscalls: check embedded nul in syscall args
Check for the nul char in pathnames and string arguments to
syscalls, return undef and set errno to ENOENT.
Added to the io warnings category syscalls.
Strings with embedded \0 chars were prev. ignored in the syscall but
kept in perl. The hidden payloads in these invalid string args may cause
unnoticed security problems, as they are hard to detect, ignored by
the syscalls but kept around in perl PVs.
Allow an ending \0 though, as several modules add a \0 to
such strings without adjusting the length.
This is based on a change originally by Reini Urban, but pretty much
all of the code has been replaced.
Tony Cook [Mon, 26 Aug 2013 01:35:21 +0000 (11:35 +1000)]
[perl #119351] update the test note for the changed B::CV::GV test
Tony Cook [Sun, 25 Aug 2013 23:26:15 +0000 (09:26 +1000)]
Tony Cook [Sun, 25 Aug 2013 23:04:47 +0000 (09:04 +1000)]
[perl #119351] fix regression in B::CV::GV
The fix for [perl #118525] introduced a regression in the behavior of
B::CV::GV.
Previously it would return a B::SPECIAL when the GV slot was NULL, the
incorrect fix changed it to return undef.
This change fixes B::CV::GV to return a B::SPECIAL for NULL for both
B::main_cv and for B::CV objects created from lexical subs.
Tony Cook [Sun, 25 Aug 2013 23:03:56 +0000 (09:03 +1000)]
bump B to 1.46
Tony Cook [Wed, 21 Aug 2013 23:38:24 +0000 (09:38 +1000)]
[perl #119351] fix B::CV::GV to return a B::SPECIAL on NULL
Father Chrysostomos [Sun, 25 Aug 2013 20:20:57 +0000 (13:20 -0700)]
Increase $re::VERSION to 0.26
Father Chrysostomos [Sun, 25 Aug 2013 20:18:45 +0000 (13:18 -0700)]
Correct sub signature in re.xs
Father Chrysostomos [Fri, 26 Jul 2013 08:26:54 +0000 (01:26 -0700)]
Fix assert fail when fetching pos clobbers ref with undef
pos($x) returns a special magical scalar that sets the match position
on $x. Calling pos($x) twice will provide two such scalars. If we
set one of them to a reference, set the other to undef, and then read
the first, all hail breaks loose, because of the use of SvOK_off.
SvOK_off is not sufficient if arbitrary values can be assigned by Perl
code. Globs, refs and regexps (among others) need special handling,
which sv_setsv knows how to do.
Father Chrysostomos [Fri, 26 Jul 2013 01:08:23 +0000 (18:08 -0700)]
Stop values from ‘sticking’ to @- and @+ elems
These arrays are very similar to tied arrays, in that the elements are
created on the fly when looked up. So push @_, \$+[0], \$+[0], will
push references to two different scalars on to @_.
That they are created on the fly prevents this bug from showing up
in most code: If you reference the element you can observe that, on
FETCH, it gets set to the corresponding offset *if* the last match has
a set of capturing parentheses with the right number. Otherwise, the
value in the element is left as-is.
So, doing another pattern match with, say, 5 captures and then another
with fewer will leave $+[5] and $-[5] holding values from the first
match, if there is a FETCH in between the two matches:
$ perl -le '" "=~/()()()()(..)/; $_ = \$+[5]; print $$_; ""=~ /()/; print $$_;'
2
2
And attempts at assignment will succeed, even though they croak:
$ perl -le 'for ($-[0]) { eval { $_ = *foo }; print $_ }'
*main::foo
The solution here is to make the magic ‘get’ handler set the SV
no matter what, instead of just setting it when it refers to a
valid offset.
Father Chrysostomos [Thu, 25 Jul 2013 01:14:06 +0000 (18:14 -0700)]
pp_hot.c: Show lengths in -Dr output for minlen optimisation
Father Chrysostomos [Sun, 25 Aug 2013 19:24:04 +0000 (12:24 -0700)]
[Merge] Regexp long string support
Father Chrysostomos [Sun, 18 Aug 2013 21:03:06 +0000 (14:03 -0700)]
Use SSize_t/STRLEN in more places in regexp code
As part of getting the regexp engine to handle long strings, this com-
mit changes any variables, parameters and struct members that hold
lengths of the string being matched against (or parts thereof) to use
SSize_t or STRLEN instead of [IU]32.
To avoid having to change any logic, I kept the signedness the same.
I did not change anything that affects the length of the regular
expression itself, so regexps are still practically limited to
I32_MAX. Changing that would involve changing the size of regnodes,
which would be a lot more involved.
These changes should fix bugs, but are very hard to test. In most
cases, I don’t know the regexp engine well enough to come up with test
cases that test the paths in question with long strings. In other
cases I don’t have a box with enough memory to test the fix.
Father Chrysostomos [Wed, 31 Jul 2013 06:49:58 +0000 (23:49 -0700)]
Stop substr re optimisation from rejecting long strs
Using I32 for the fields that record information about the location of
a fixed string that must be found for a regular expression to match
can result in match failures, because I32 is not large enough to store
offsets >= 2**31.
SSize_t is appropriate, since it is 64 bits on 64-bit platforms and 32
bits on 32-bit platforms.
This commit changes enough instances of I32 to SSize_t to get the
added test passing and suppress compiler warnings. A later commit
will change many more.
Father Chrysostomos [Thu, 25 Jul 2013 23:52:59 +0000 (16:52 -0700)]
Make @- and @+ return correct offsets beyond 2**31
Father Chrysostomos [Thu, 25 Jul 2013 23:41:01 +0000 (16:41 -0700)]
Make $' work past the 2**31 threshold
Father Chrysostomos [Thu, 25 Jul 2013 07:41:07 +0000 (00:41 -0700)]
[perl #116907] Allow //g matching past 2**31 threshold
Change the internal fields for storing positions so that //g in scalar
context can move past the 2**31 character threshold. Before this com-
mit, the numbers would wrap, resulting in assertion failures.
The changes in this commit are only enough to get the added test pass-
ing. Stay tuned for more.
Father Chrysostomos [Wed, 24 Jul 2013 21:23:54 +0000 (14:23 -0700)]
Stop minlen regexp optimisation from rejecting long strings
This fixes #112790 and part of #116907.
The length of the string is cast to I32, so it wraps and end up less
than the minimum length.
For now, simply skip this optimisation if minlen itself wraps and
becomes negative.
Father Chrysostomos [Sat, 27 Jul 2013 14:10:08 +0000 (07:10 -0700)]
regexec.c:regexec_flags: Remove unused var
This variable, end_shift, only ever holds the value 0. It is used in
only one place, where its value is assigned to another variable.
The history is interesting:
start_shift and end_shift were added in
c277df42229, which added sub-
string optimisations.
146174a91a192 rearranged stuff a bit, causing
these variables to be unused.
155aba94f6 commented out the unused
start_shift to suppress a compiler warning.
1df70142a966e remove=
the start_shift comment, leaving the comment describing end_shift
nonsensical.
Father Chrysostomos [Tue, 23 Jul 2013 20:15:34 +0000 (13:15 -0700)]
Stop pos() from being confused by changing utf8ness
The value of pos() is stored as a byte offset. If it is stored on a
tied variable or a reference (or glob), then the stringification could
change, resulting in pos() now pointing to a different character off-
set or pointing to the middle of a character:
$ ./perl -Ilib -le '$x = bless [], chr 256; pos $x=1; bless $x, a; print pos $x'
2
$ ./perl -Ilib -le '$x = bless [], chr 256; pos $x=1; bless $x, "\x{1000}"; print pos $x'
Malformed UTF-8 character (unexpected end of string) in match position at -e line 1.
0
So pos() should be stored as a character offset.
The regular expression engine expects byte offsets always, so allow it
to store bytes when possible (a pure non-magical string) but use char-
acters otherwise.
This does result in more complexity than I should like, but the alter-
native (always storing a character offset) would slow down regular
expressions, which is a big no-no.
Father Chrysostomos [Sun, 25 Aug 2013 18:19:44 +0000 (11:19 -0700)]
Don’t push nulls on to the stack in pp_padav
This is something that
ce0d59fdd1c missed.
This will probably fix most of the modules mentioned in
ticket #119433.
Father Chrysostomos [Sun, 25 Aug 2013 14:12:21 +0000 (07:12 -0700)]
$Increase B::Concise::VERSION to 0.99
Father Chrysostomos [Sun, 25 Aug 2013 14:07:37 +0000 (07:07 -0700)]
Unbreak Concise glob output
$ ./perl -MO=Concise -Ilib -le '; print <\n>'
8 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 23 -e:1) v:{ ->3
7 <@> print vK ->8
3 <0> pushmark s ->4
6 <@> glob[t2] lK/1 ->7
- <0> ex-pushmark s ->4
4 <$> const[PV "\n"] s ->5
Can't locate object method "NAME" via package "B::SPECIAL" at lib/B/Concise.pm line 707.
CHECK failed--call queue aborted.
e88567f2acf38fe5ed90a88569b808e82cd3eca1 is the first bad commit
commit
e88567f2acf38fe5ed90a88569b808e82cd3eca1
Author: Father Chrysostomos <sprout@cpan.org>
Date: Sun Nov 4 20:18:51 2012 -0800
Stop the glob operator from leaking GVs
It was adding GVs to the symbol table (via newGVgen), so they
would never be freed, even after the op was freed, unless done so
explicitly.
There is no reason for these GVs to be exposed.
That means $gv->STASH returns a B::SPECIAL. B::Concise was not pre-
pared to handle that.
Father Chrysostomos [Sun, 25 Aug 2013 07:21:14 +0000 (00:21 -0700)]
toke.c:scan_str: Document args in one spot
and space for readability
Father Chrysostomos [Sun, 25 Aug 2013 00:50:52 +0000 (17:50 -0700)]
Make __DATA__ use the right pkg
__DATA__ is supposed to stuff the rest of the file into the DATA han-
dle belonging to the package in scope where __DATA__ is encountered.
That means this should always print 123:
print <DATA>;
__DATA__
123
But it fails if the package has been renamed through glob assignment:
package foo;
BEGIN{*foo::=*bar::}
print <DATA>;
__DATA__
123
(Prints nothing.)
The code for stuffing DATA was stringifying the package and then look-
ing it up again. Not only is it more correct to avoid the stringifi-
cation, but faster, too.
Zefram [Sun, 25 Aug 2013 19:06:13 +0000 (20:06 +0100)]
note Module::Build's core-deprecation
Module::Build reports that it's deprecated from core from version 5.19.0,
but this information was missing from Module::CoreList.
Father Chrysostomos [Sun, 25 Aug 2013 08:30:18 +0000 (01:30 -0700)]
pp_ctl.c:pp_flop: Avoid redundant SvNV calls
Calling SvNV on an SV that is IOK is unnecessary, and results in an
extra function call if the SV is not NOKp. If an NV is out of range
and has been used as an int, it will be IOKp but not IOK.
Father Chrysostomos [Sun, 25 Aug 2013 07:13:33 +0000 (00:13 -0700)]
Increase $mro::VERSION to 1.14
Father Chrysostomos [Sun, 25 Aug 2013 07:11:34 +0000 (00:11 -0700)]
Increase $Math::BigInt::FastCalc::VERSION to 0.31
Father Chrysostomos [Sun, 25 Aug 2013 07:10:16 +0000 (00:10 -0700)]
Increase $Data::Dumper::VERSION to 2.149
Father Chrysostomos [Sun, 25 Aug 2013 06:45:46 +0000 (23:45 -0700)]
Stifle diag.t
Maybe we should extend it at some point to run things through
splain and see whether there is a match.
Father Chrysostomos [Sun, 25 Aug 2013 07:08:21 +0000 (00:08 -0700)]
Use SSize_t for arrays
Make the array interface 64-bit safe by using SSize_t instead of I32
for array indices.
This is based on a patch by Chip Salzenberg.
This completes what the previous commit began when it changed
av_extend.
Father Chrysostomos [Sun, 25 Aug 2013 05:51:40 +0000 (22:51 -0700)]
Croak when range tries to extend stack too far
This fixes the rest of ticket #119161.
The range operator uses IVs internally to hold the current value for
integer ranges. It already checks that the arguments are within the
IV range and croaks otherwise. However, on 32-bit platforms with
64-bit integers, the different between the range’s endpoints can
exceed the maximum allowed memory allocation. This resulted in a
crash for 1..2**31, because EXTEND was passed a value which, when
cast to SSize_t, became -1, resulting in no reallocation. Then
pp_flop proceeded to write past the end of the stack.
No tests are included in this commit, as 1..2**31 could give three
different results depending on the platform.
Father Chrysostomos [Sun, 25 Aug 2013 02:09:59 +0000 (19:09 -0700)]
Use SSize_t when extending the stack
(I am referring to what is usually known simply as The Stack.)
This partially fixes #119161.
By casting the argument to int, we can end up truncating/wrapping
it on 64-bit systems, so EXTEND(SP,
2147483648) translates into
EXTEND(SP, -1), which does not extend the stack at all. Then writing
to the stack in code like ()=1..
1000000000000 goes past the end of
allocated memory and crashes.
I can’t really write a test for this, since instead of crashing it
will use more memory than I have available (and then I’ll start for-
getting things).
Father Chrysostomos [Sun, 25 Aug 2013 01:02:09 +0000 (18:02 -0700)]
Use SSize_t for tmps stack offsets
This is a partial fix for #119161.
On 64-bit platforms, I32 is too small to hold offsets into a stack
that can grow larger than I32_MAX. What happens is the offsets can
wrap so we end up referencing and modifying elements with negative
indices, corrupting memory, and causing crashes.
With this commit, ()=1..
1000000000000 stops crashing immediately.
Instead, it gobbles up all your memory first, and then, if your com-
puter still survives, crashes. The second crash happesn bcause of
a similar bug with the argument stack, which the next commit will
take care of.
Zefram [Sun, 25 Aug 2013 11:23:19 +0000 (12:23 +0100)]
install useful Regexp::CARP_TRACE from Carp
Regexp is a built-in class for which no module is normally loaded, so it
can't provide its own CARP_TRACE method. Carp must therefore supply it.
The method formats a regexp reference as a qr() expression as much as
possible. Like string arg formatting, it uses \x{} escapes for literal
characters that are not ASCII printable, and it truncates according
to $Carp::MaxArgLen. The truncation happens at a different stage of
processing from its position in string arg formatting, because regexp
stringification presents an already-partly-escaped form of the regexp.
Zefram [Sun, 25 Aug 2013 10:45:48 +0000 (11:45 +0100)]
remove stray debugging print statements
Debugging code was left in the version of Carp's string arg formatting
that handles upgraded strings on older perls.
Zefram [Sun, 25 Aug 2013 10:28:27 +0000 (11:28 +0100)]
more tests for $Carp::MaxArgLen
Ricardo Signes [Sun, 25 Aug 2013 02:50:29 +0000 (22:50 -0400)]
perlexperiment: Unicode on EBCDIC is not backtracking
Ricardo Signes [Sun, 25 Aug 2013 02:23:24 +0000 (22:23 -0400)]
perlexperiment: ticket for pluggable keywords
Ricardo Signes [Sun, 25 Aug 2013 02:09:22 +0000 (22:09 -0400)]
perlexperiment: ticket for :win32 pseudolayer
Ricardo Signes [Sun, 25 Aug 2013 01:52:35 +0000 (21:52 -0400)]
perlexperiment: ticket link for regex_sets
Ricardo Signes [Sun, 25 Aug 2013 01:36:38 +0000 (21:36 -0400)]
release schedule: the rest of 2013 (except September!)
Ricardo Signes [Sun, 25 Aug 2013 01:31:02 +0000 (21:31 -0400)]
release schedule: 5.18.1 is out and 5.14.x is EOL
Zefram [Sat, 24 Aug 2013 19:30:09 +0000 (20:30 +0100)]
update copyright years for Carp dual-life release
Zefram [Sat, 24 Aug 2013 18:10:31 +0000 (19:10 +0100)]
update autodie test for new Carp stack trace form
Zefram [Sat, 24 Aug 2013 17:00:36 +0000 (18:00 +0100)]
consistently escape args in Carp stack trace
Previously, an upgraded string argument would be wrapped in quote
characters but have all of its characters represented literally in
the stack trace, including control characters. Also, the escaping of
unprintable characters for downgraded string arguments wasn't consistent
with Perl syntax: it used \x{} escapes inside single quotes.
The new way is that string arguments (except those that look numeric)
are represented as double-quoted strings, using correct Perl syntax.
Characters outside the ASCII printable range always get \x{} escaping,
whether the string is upgraded or downgraded. ASCII printables that
require backslash escaping get it. Where an argument is truncated
due to length, the added ellipsis appears outside the double quotes,
to avoid ambiguity with a string that contains actual dots.
Implementing this is complicated by problems with applying regexps to
upgraded strings, which are particularly a problem in the constrained
environment in which Carp must run. This has previously inhibited us
from implementing correct handling of upgraded strings. The problems
were all resolved in Perl 5.13.11, so from there on we can just use the
simple regexp implementation. On older Perls upgraded strings now get
the same treatment, but implemented in a less efficient manner that does
not use regexps.
Non-string arguments, most notably references, are now are not represented
as quoted strings. The overload::StrVal() representation is safely
distinct from other argument representations. This in particular allows
distinguishing between an argument that is a reference and an argument
that is the result of stringifying a reference.
Nicholas Clark [Thu, 22 Aug 2013 09:48:29 +0000 (11:48 +0200)]
For SDBM_File, stop EU::MM from generating its default subdirs rule.
The default subdirs rule creates a race condition with the rule that
Makefile.PL explicitly adds to generate libsdbm.a, which can cause parallel
makes to fail.
Father Chrysostomos [Sat, 24 Aug 2013 12:54:23 +0000 (05:54 -0700)]
Don’t give unavailability warnings about our vars
Commit
ce0d59fdd1c started using NULL to indicate nonexistent array
elements. Since pads are AVs, they are filled with NULLs initially,
rather than &PL_sv_undef.
For ‘our’ vars, the pad entry is never actually touched. Only one
piece of code was inspecting it, namely S_cv_clone_pad. &PL_sv_undef
just happens to pass the checks that make sure the var is not stale.
However, we really should not be checking that at all if this is an
‘our’ var.
Even if we change ‘our’ vars back to having a &PL_sv_undef pad
entry, this fix should stay, as it makes the code clearer and makes
S_cv_clone_pad more robust.
Father Chrysostomos [Sat, 24 Aug 2013 01:26:47 +0000 (18:26 -0700)]
podcheck.t: Skip perl5200delta
I would have to change the header to something other than
‘perldelta’, even though that is what the final document
will have.
I would also have to start adding modules to the known modules
list which will not have to be there in the final release.
That is more work than necessary, so just skip this file for now.
Father Chrysostomos [Sat, 24 Aug 2013 01:18:36 +0000 (18:18 -0700)]
Add perl5200delta to MANIFEST
Father Chrysostomos [Sat, 24 Aug 2013 01:11:55 +0000 (18:11 -0700)]
List broken modules from #119125 in perl5200delta
so that we can track these all in one spot and close the various RT
tickets as we go.
I am only listing ‘high-profile’ modules, meaning those that have
at least 5 dependents (an arbitrary number picked by Jesse Vincent
some time ago).
Father Chrysostomos [Sat, 24 Aug 2013 01:08:31 +0000 (18:08 -0700)]
Start perl5200delta
just the template for now
Zefram [Fri, 23 Aug 2013 22:11:30 +0000 (23:11 +0100)]
avoid package name "B" in Carp tests
[rt.cpan.org #76167] For tests not relating to the B module, avoid using
"B" as a package name.
Zefram [Fri, 23 Aug 2013 21:58:41 +0000 (22:58 +0100)]
regularise test for Carp vivifying B stash
There's an old test to check that Carp doesn't vivify B:: despite
attempting to use B::svref_2object(). Turn this into the same kind of
test now used for overload::StrVal() and utf8::downgrade(), testing more
cleanly for stash vivification and also testing for GV vivification.
Karl Williamson [Fri, 23 Aug 2013 19:38:03 +0000 (13:38 -0600)]
PATCH: [perl #119443] Blead won't compile on wince
This commit adds #if's to cause locale handling code to compile on
platforms that don't have full-featured locale handling. The commits
mentioned in the ticket did not adequately cover these situations.
Karl Williamson [Thu, 22 Aug 2013 17:17:20 +0000 (11:17 -0600)]
regcomp.c: Silence compiler warning
This call to regclass_swash() is not using its return value, so don't
store it in a variable that is otherwise unused, which causes some
compilers to complain.
Father Chrysostomos [Fri, 23 Aug 2013 07:50:40 +0000 (00:50 -0700)]
Carp: paranoid sub lookup
Carp avoids autovivifying stashes when seeing whether a sub like
utf8::is_utf8 or overload::StrVal exists.
Its logic was slightly faulty, in that it did not take into account
that the existence of $::{"utf8::"} does not indicate the presence
of a typeglob in that element. It could have been created due to
autovivification. It also failed to take into account that $utf8::’s
HASH slot might be empty. This would result in death.
In fixing this, I moved the common logic into a single function
and also took the opportunity to avoid multiple hash lookups in
a row.
Father Chrysostomos [Fri, 23 Aug 2013 07:03:11 +0000 (00:03 -0700)]
regen pod issues
Father Chrysostomos [Fri, 23 Aug 2013 06:57:41 +0000 (23:57 -0700)]
Fix some long lines in BigInt.pm
Father Chrysostomos [Fri, 23 Aug 2013 06:37:44 +0000 (23:37 -0700)]
Long verbatim pod lines in BigFloat.pm
Father Chrysostomos [Fri, 23 Aug 2013 06:06:30 +0000 (23:06 -0700)]
toke.c: Merge some mad and sane code
These two code paths are now nearly identical. However, one uses s as
its cursor; the other uses d therefor while using s to remember the
previous position. If we switch the uses of d and s, then outside of
PL_madskills we don’t even need to set d.
Father Chrysostomos [Fri, 23 Aug 2013 05:35:28 +0000 (22:35 -0700)]
toke.c: Remove commented-out code
This ‘if(){’ has been commented out since it was added in
5db068806.
Presumably the intent was to make the special mad code specific to
PL_madskills at some point and have mad builds running without
PL_madskills follow the same code as regular builds (the *s = '\0' and
PL_bufend assignments).
Since then, though, the standard code has changed to match the mad
code. The next commit will merge them.
Father Chrysostomos [Fri, 23 Aug 2013 05:58:37 +0000 (22:58 -0700)]
Fix typo in
bf1b738b; another line num bug
This affects only mad builds. The line number after
nullary_keyword_such_as_time
;
was off by one.
Tony Cook [Fri, 23 Aug 2013 06:32:08 +0000 (16:32 +1000)]
[perl #119429] restore XS module building on WinCE
The Makefile.ce PV change was split off into an update of
bump-perl-version
Daniel Dragan [Thu, 22 Aug 2013 18:11:17 +0000 (14:11 -0400)]
restore XS module building for WinCE
configpm
- when debugging configpm, Config.pm is already loaded, so the alternate
Config.pm for CE isn't loaded, warn about the problem and delete the
native Config.pm to allow the cross Config.pm to be loaded
win32/Makefile.cd
- better build product cleanup, copy from the win32 makefile
- disable a bunch of module that dont/dont yet build on CE
- debugging configpm required a shortcut to make it easier to run in
isolation
- fix the defines that wind up in the cross Config.pm
- add -GS- to disable the MS Security Cookie feature on MSVC for ARM >=14
compilers, this stops a .lib linking error, security cookie overhead
isnt needed for a very space limited device
sdsdkenv.bat is the file I use to set env vars to compile for WM since
starting in SmartDevices SDK, there is no equivelent of vcvarsall.bat
for makefile building, there was a vcvarsall.bat equivelent in EVC4 tho
MSVC for non Intel CPUs sometimes isn't named cl.exe, fix config_sh.PL to
deal with it
how to compile CE Perl, some steps involving celib and MS SDKs not included
and 2 patches to CPAN modules, Socket and MakeMaker, are not in this commit
but they are required to build CE Perl
-in a Win32 x86/x64 command prompt do a "nmake all" to make a Desktop Perl
-then in a WinCE build env command prompt do a "nmake -f makefile.ce all"
-/xlib will have all your XS DLLs and PM files, /win32/$(MACHINE) will
have perl519.dll and perl.exe
Tony Cook: update MANIFEST
Tony Cook [Fri, 23 Aug 2013 05:50:54 +0000 (15:50 +1000)]
[perl #119429] bump-perl-version now updates Makefile.ce
Father Chrysostomos [Thu, 22 Aug 2013 17:01:58 +0000 (10:01 -0700)]
[perl #118931] Fix line number bug
Commit 2179133 (in 5.19.2) introduced this line number bug when it
modified the parser to look past newlines when searching for => after
a keyword:
$ perl5.19.3
1 unless
1;
warn;
^D
Warning: something's wrong at - line 2.
The warning should say line 3, not 2.
Before 2179133, the parser’s line-reading algorithm work strictly in
two modes: From a file, one line would be read into PL_linestr at a
time. In a string eval, PL_linestr would contain all the code.
To be able to look past a newline to find => after a keyword, the
parser’s former mode had to be adjusted:
• It has to be possible to append more lines of input to the buffer
without incrementing the line number.
• When reading from a filehandle, the lexer should not assume when it
sees "\n" that it has reached the end of the buffer.
Commit 2179133 did those two things.
It did not, however, make the lexer increment the line number when
encountering a newline in the middle of it (when reading from a han-
dle; string eval follows a different code path).
Fixing it to do that requires that lex_start be adjusted, too. When
lexing begins, PL_linestr is set to "\n;" when there is no string to
eval. This worked for file handles because the lexer, on seeing the
\n, would ignore the semicolon.
Now that it no longer ignores the semicolon, it will end up incre-
mented the line number erroneously at the outset, so set the buffer
to just "\n" instead.
In one place (skipspace2), the mad-specific code was setting PL_bufptr
to point at its previous location after calling skipspace. skipspace
sets it to point after the newline to prevent incline() from being
called a second time for the same newline. But this is exactly what
happens if skipspace2 resets PL_bufptr. The callers of skipspace2
apparently don’t depend on this, so we can remove it.
Ricardo Signes [Fri, 23 Aug 2013 01:49:42 +0000 (21:49 -0400)]
perlexperiment: add ticket link for autoderef
Tony Cook [Fri, 23 Aug 2013 01:26:58 +0000 (11:26 +1000)]
perldelta for
5ceca735,
6358232b
Peter John Acklam [Thu, 15 Aug 2013 04:13:17 +0000 (14:13 +1000)]
Add bint() method for rounding towards zero.
Since bfloor() and bceil() exist, add bint() for completeness. As with
bfloor() and bceil(), bint() does not change the object class. This is
unlike as_int(), which converts the object to a Math::BigInt.
Rename bint() subroutine in the example section to bigint() to avoid
confusion with the new method bint().
Add tests for bint().
Add a little more precise documentation of bfloor() and bceil().
Tony Cook [Fri, 23 Aug 2013 00:58:43 +0000 (10:58 +1000)]
bump versions for Math::BigInt and Math::BigFloat
Tony Cook [Fri, 23 Aug 2013 00:34:09 +0000 (10:34 +1000)]
Clean up POD for Math::BigInt and Math::BigFloat
Based on work done by Peter John Acklam, differences from his original
patch:
- links to items (which have been corrected by others) have been retained
- unnecessary conversion of < and > to E<lt> and E<gt> has been skipped.
- =over N has been converted to =over
- adjusted white-space in many places to avoid hitting column 80 in
perldoc for verbatim text
Zefram [Thu, 22 Aug 2013 21:57:01 +0000 (22:57 +0100)]
detect Carp/Carp::Heavy version mismatch
[rt.cpan.org #79649] If an old Carp, requiring old-style Carp::Heavy
that provides subroutines, gets a newer stub-style Carp::Heavy, due to
@INC having changed, the resulting error messages were not awesome.
Zefram [Thu, 22 Aug 2013 21:29:08 +0000 (22:29 +0100)]
avoid more vivification in Carp
Avoid vivifying the overload::StrVal subroutine, its glob, or its stash.
This is done in the same way as the existing avoidance of vivification of
utf8::is_utf8 and utf8::downgrade. However, the check has to be made at
runtime, whereas the utf8-related ones are checked at load time, because
the utf8 ones are built into the perl core (only absent pre perl 5.8)
but overload is a separate module that can be loaded later.
Chris 'BinGOs' Williams [Thu, 22 Aug 2013 18:04:47 +0000 (19:04 +0100)]
Skip dynaloader test on Bitrig like we do for OpenBSD
Chris 'BinGOs' Williams [Thu, 22 Aug 2013 16:08:33 +0000 (17:08 +0100)]
Update perldelta for Bitrig platform support
Chris 'BinGOs' Williams [Thu, 22 Aug 2013 15:15:14 +0000 (16:15 +0100)]
Add Marco Peereboom and Owain G. Ainsworth to AUTHORS
Chris 'BinGOs' Williams [Thu, 22 Aug 2013 15:11:29 +0000 (16:11 +0100)]
Apply bitrig change to lib/locale.t too
This change appears to have entered the bitrig source tree via
openbsd source merge.
Owain G. Ainsworth [Thu, 22 Aug 2013 14:55:02 +0000 (15:55 +0100)]
Tweak the perl build some
Fix the cross makefile. makefile.SH treat us like openbsd.
hints/bitrig.sh: remove all version number detection goop. this is for
openbsd versions that are currently *higher* then the bitrig version
number, so avoid foot shooting by throwing it out.
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Marco Peereboom [Thu, 22 Aug 2013 14:41:42 +0000 (15:41 +0100)]
Add support for Bitrig BSD
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Father Chrysostomos [Thu, 22 Aug 2013 15:32:11 +0000 (08:32 -0700)]
Fix Peek.t failure under -DPERL_NO_COW
The code for stripping out COW_REFCNT needs to be more lenient
and allow things like COW_REFCNT = [12].
Father Chrysostomos [Thu, 22 Aug 2013 04:59:20 +0000 (21:59 -0700)]
[perl #118747] Allow in-place s///g when !!PL_sawampersand
This is the more correct version of
1555b325 which was reverted
by
6200d5a0e.
In pp_subst, there is an initial pattern match against the target
string, followed by logic to determine which of several code paths
will handle the rest of the substitution, depending on which shortcuts
can be taken.
There is one path specifically for doing a global sort (/g) and modi-
fying the target in place. This code was skipped if the target was a
copy-on-write scalar or if the pre-match copy was enabled. The pre-
match copy is always enabled now, so this code is unreachable.
In-place substitution stringifies the rhs at the outset, just after
the first regexp match, but before any substitution. Then it uses
that string buffer, expecting it not to change.
That clearly cannot work with s/a/$&/g; it will also cause erratic
behaviour in the case of regexp code blocks (which will see the
string being modified, which doesn not happen with unoptimised subst).
That’s why the in-place optimisation has to be skipped when the
REXEC_COPY_STR flag is set.
But we can tweak that logic:
• As long as the rhs is not a magical var, its contents are not going
to change from one iteration to the next.
• If there are no code blocks, nothing will see the string during the
substitution.
So this commit adds logic to check those things, enabling this opti-
misation where possible.
Skipping this optimisation for the pre-match copy was originally added
in commit
5d5aaa5e7.
Father Chrysostomos [Fri, 26 Jul 2013 13:25:36 +0000 (06:25 -0700)]
Remove null check from mg.c:magic_getvec
lsv can never be null here. This null check has been here since
vec’s get-magic was added in
ae389c8a or
6ff81951f7.
Father Chrysostomos [Fri, 26 Jul 2013 06:09:58 +0000 (23:09 -0700)]
Fix assertion failure with $#a=\1
If the array has been freed and a reference is then assigned to
the arylen scalar and then get-magic is called on that scalar,
Perl_magic_getarylen misbehaves. SvOK_off is not sufficient if
arbitrary values can be assigned by Perl code. Globs, refs and
regexps (among others) need special handling, which sv_setsv
knows how to do.
Niko Tyni [Tue, 6 Aug 2013 13:57:00 +0000 (16:57 +0300)]
Skip the perldoc test if 'man' is missing
This fixes a test failure in minimal build environments without
a 'man' command.
Steve Hay [Thu, 22 Aug 2013 07:41:38 +0000 (08:41 +0100)]
Upgrade Perl::OSType from 1.003 to 1.004