| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
It turns out that some of what t/op/while_readdir.t was testing
was also tested by t/op/defins.t
|
|
|
|
|
|
| |
This takes as input the current Unicode character data base, and outputs
lists of the multi-character folds in it, in a form suitable for input
to regen/regcharclass.pl
|
|
|
|
|
| |
(I have an ulterior motive. I need somewhere to list broken CPAN modules
once patches are submitted, so I can close RT tickets.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As mentioned in <https://rt.cpan.org/Ticket/Display.html?id=79915>,
bigint.pm does not use any prototype when globally overriding hex.
This means that map { hex } ... will stop working in completely unre-
lated code if bigint happens to be loaded. (Explicit $_ will con-
tinue to work.)
I thought it would be a simple matter of adding the right prototype
depending on perl version (and inferring $_), but the basic tests
I added failed for other reasons after I fixed the prototype and
$_ handling.
It turns out this whole thing is a mess, so I have basically reimple-
mented these two overrides.
What bigint, bignum and bigrat were doing was this: In import,
*CORE::GLOBAL::hex and ::oct are assigned functions that create
Math::BigInt objects if the pragma is in effect. If import is passed
'hex' or 'oct', then the function assigned does not check the pragma
hints, but simply creates Math::BigInt objects regardless.
This means that ‘use bigrat’ stops hex() and oct() from creating
objects in ‘use bigint’ scopes, and vice versa. In fact, whichever
pragma is loaded last wins. Any scopes elsewhere in the program that
use the same pragma will have special hex() and oct() behaviour. But
the other two lowercase big* pragmata will be disabled with regard to
hex and oct.
Having ‘use bigint 'hex'’ override hex globally makes no sense to me.
I have no qualms about changing it, as it was already broken. Any
subsequent ‘use bigint;’ would turn off the global override. So now
it exports hex or oct to the calling package, just like a normal mod-
ule. You can now also call bigint::hex.
Also, in writing tests I found that oct("20") gives me 20. Apparently
this was never tested properly.
I also found notes about ‘5.9.4 or later’ when the code checked
$] > 5.009004. (Actually, in one place the code checked > 5.009003,
so I made it match, as we use the _ prototype now, which was intro-
duced in 5.9.5.) One was in the docs, so I changed it to 5.10.0,
since it is not helpful to mention dev versions. The docs were also
wrong to imply that ‘no bigint’ would countermand ‘use bigint 'hex'’.
|
| |
|
|
|
|
|
| |
Historical behaviour is that file handles take priority over package names,
and the use of PL_stashcache shouldn't change this.
|
|
|
|
|
| |
my subs do not currently work yet. I am not sure what the API
should be.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically the regex engine has assumed that any string passed to it
will have a trailing null char. This isn't normally an issue in perl code,
since perl strings *are* null terminated; but it could cause problems with
strings returned by XS code, or with someone calling the regex engine
directly from XS, with strend not pointing at a null char.
The engine currently relies on there being a null char in the following
ways.
First, when at the end of string, the main loop of regmatch() still reads
in the 'next' character (i.e. the character following the end of string)
even if it doesn't make any use of it. This precludes using memory mapped
files as strings for example, since the read off the end would SEGV.
Second, the matching algorithm often required the trailing character to be
\0 to work correctly: the test for 'EOF' was "if next char is null *and*
locinput >= PL_regeol, then stop". So a random non-null trailing char
could cause an overshoot.
Thirdly, some match ops require the trailing char to be null to operate
correctly; for example, \b applied at the end of the string only happens
to work because the trailing char (\0) happens to match \W.
Also, some utf8 ops will try to extract the code point at the end, which
can result in multiple bytes past the end of string being read, and
possible problems if they don't correspond to well-formed utf8.
The main fix is in S_regmatch, where the 'read next char' code has been
updated to set it to a special value, NEXTCHR_EOS instead, if we would be
reading past the end of the string.
Lots of other random bits in the regex engine needed to be fixed up too.
To track these down, I temporarily hacked regexec_flags() to make a copy
of the string but without trailing \0, then ran all the t/re/*.t tests
under valgrind to flush out all buffer overruns. So I think I've removed
most of the bad code, but by no means all of it. The code within the
various functions in regexec.c is far too complex to be able to visually
audit the code with any confidence.
|
|
|
|
| |
Soon, we’ll be testing that these tests work. :-)
|
| |
|
| |
|
|
|
|
|
| |
MPE/iX was a business-oriented minicomputer operating system made by
Hewlett-Packard. Support from HP terminated at the end of 2010.
|
|
|
|
|
|
|
|
|
| |
If a pattern passed to File::Glob consists of a space-separated list
of patterns, the stack will only be extended by doglob() enough for
the list returned by each subpattern. So iterate() needs to extend
the stack before copying the list of files from an AV to the stack.
This fixes a regression introduced in 5.16.0.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This changes &foo to go through S_pending_ident (by setting
PL_pending_ident, which causes yylex to defer to S_pending_ident for
the next token) the way $foo and %foo do.
This necessitated reducing the maximum identifier length of &foo from
252 to 251, making it match @foo, $foo, etc. So somebody’s JAPH might
break. :-)
|
|
|
|
|
| |
The recently added utf8_strings.h has been expanded to include more than
just strings. I'm renaming it to avoid confusion.
|
| |
|
|
|
|
|
|
| |
This patch to lib/perl5db.pl and lib/perl5db.t adds more tests for the L
and S commands and reverts some changes from C-style for loops to
while+continue loops which were not very popular.
|
|
|
|
|
|
|
|
|
|
| |
This patch adds more tests for lib/perl5db.pl on lib/perl5db.t. One note
is that I'm a bit uncomfortable about the test for ".", which did
not initially work exactly as I expected, due to debugger quirks.
This patch also fixes a bug where the /pattern/ command (and possibly
the ?pattern? command as well) got broken due to the addition of "use
strict;", and adds tests for them.
|
|
|
|
|
| |
VM/ESA was a mainframe OS. IBM ended service on it in June 2003. It was
superseded by Z/VM.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This add regen/utf8_strings.pl takes Unicode characters and generates
utf8_strings.h to contains #defines for macros that translate from the
name to the UTF-8. This is needed in a few places, where previously
things were manually figured out and hard-coded in. Doing this instead
makes this easier, and removes EBCDIC dependencies/bugs, as the file
would simply be regen'd on an EBCDIC platform.
|
|
|
|
|
|
|
|
|
|
| |
This will be used for things need to handle inversion lists in the three
files that currently use them. I'm putting this in a separate hdr,
because inversion lists are very internal-only, so should not be grouped
in with things that there is an external API for. It is a dot-c file so
that the functions can continue to be declared with embed.fnc, and
porting/args_assert.t will continue to work, as it looks only in .c
files.
|
|
|
|
|
|
| |
We can put static inline functions here, and they can depend on
function prototypes and struct definitions from other header
files.
|
|
|
|
| |
and a few error cases
|
| |
|
| |
|
|
|
|
| |
This incorporates earlier blead customizations to t/fill.t and t/tabs.t
|
| |
|
|
|
|
|
|
| |
UTS was a mainframe version of System V created by Amdahl, subsequently sold
to UTS Global. The port has not been touched since before 5.8.0, and UTS
Global is now defunct.
|
|
|
|
|
| |
There were already no t/lib/Test or cgi-lib_porting.html files, so these
can be removed from EXCLUDED.
|
|
|
|
|
|
| |
The core build process cannot use Build.PL since Module::Build and/or its
prerequisites may not have been built yet, so EXCLUDE that and retain our
(already CUSTOMIZED) Makefile.PL instead for now.
|
|
|
|
| |
The file was added by c3c06741ad.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
In theory this is a security issue, but from discussion on the
security list that the system perl (or the perl used for anything
critical) is wildly unlikely to have been built with -Dmad.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the size of the CoreList.pm file by storing the difference
between the versions of perl rather than a full list for each version.
In order to achieve this without changing the interface each key in the
%version hash is tied to a special tied hash that inflates the stored
difference data to the full list of modules and versions.
As part of the upgrade I ran a comparison with the
%version hash in the current Module::CoreList -- there are no
differences.
|
|
|
|
|
| |
For filenames that are absolute, or start with ./ or ../ only coderefs in
@INC are called - directories are skipped. Test this behaviour.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than adding more canned configurations, we dynamically set values
which differ from the standard 32-bit build options, and actually remove
the canned configurations for 64-bit builds too and do likewise for them.
The ~ARCHPREFIX~ games used by the outgoing .gc64 configuration needed
bringing into the remaining .gc configuration to maintain support for the
GCCCROSS build option.
Two tweaks to sv.c were required for the USE_64_BIT_INT option to work
with a VC++ build, allowing the I64 printf size specification. The GCC
build worked anyway since it uses ll rather than I64.
The motivation for this change came from a patch submitted by Sisyphus
<sisyphus1@optusnet.com.au>:
Message-ID: <6AC52DD00C96415A9E919A02F12DD05F@desktop2>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an AUTOLOAD subroutine loads a sub by assigning to the glob, there
may be code elsewhere that has a reference to a stub, that is now
assigned over. To cope with this situation, calls to undefined sub-
routines will fall back to whatever sub is in the subroutine’s owner
typeglob. This has been the case since Perl 5.000.
But the error message that occurs if the typeglob happens to have no
sub in it is wrong:
$ perl -e '
my $foosub = \&foo;
undef *foo;
&$foosub;
'
Not a CODE reference at -e line 4.
as opposed to this:
$ perl -e '
my $foosub = \&foo;
&$foosub;
'
Undefined subroutine &main::foo called at -e line 3.
They should both produce the same error message, because $foosub is a
code reference, albeit without a body.
|