Move @letters in test.pl earlier
Add _num_to_alpha() to test.pl

Also added testing for _num_to_alpha()
Added optional char limit to _num_to_alpha() in test.pl
Added test names to some tests in t/test_pl/_num_to_alpha.t
Rework tempfile() in t/test.pl to use _num_to_alpha()
Added t/test_pl/tempfile.t
Make t/test_pl/tempfile.t produce more diagnostics
Add t/test_pl* to MANIFEST

Soon, we’ll be testing that these tests work. :-)
Restore perly.o build with -DDEBUGGING
Correct fm vtable in perlguts.pod

fm magic uses want_vtbl_fm, which is #defined as want_vtbl_regexp.
The definition in regen/mg_vtable.pl does not affect anything except
the documentation.  It was listed as using regdata which was wrong.
Test for errors requiring .ph files.
Stop declaring non-exported externs to non-core XS modules [perl #114516]

Hide the perl.h declarations of gete?[ug]id and getlogin on Win32 since
they are already declared in win32/win32.h, nearer to their definitions
(stub functions for UNIX compatibility) in win32/win32.c.

Also only declare them, and kill(pg)?, sbrk, chown and mkstemp, under
PERL_CORE anyway since they are not exported: including declarations for
non-exported functions just hides compiler errors about the symbols being
undefined, which doesn't help when trying to fix subsequent errors from
the linker about the symbols being unresolved. (Actually, all but sbrk,
chown and mkstemp get indirected through the perlhost layer normally
anyway, but it doesn't hurt to still hide the declarations, and helps in
the case of PERL_IMPLICIT_SYS not being defined, where only kill is
redefined to something which is exported.)

The declarations of the set[ug]id stub functions remain for now because
those two symbols are currently exported.
regmatch(): use nextchar where available

In a couple of places the code was using *locinput, where
nextchar already equalled *locinput
regmatch(): consolidate locinput++

There are several places in the code that increment locinput by 1 char
(which may or may not be 1 byte) then update nextchr.

Consolidate these into a single code block with the others goto'ing it.
This actually reduces the code more than it appears, since the CCC_TRY*
macros expand into several branches, each of which repeatthe
increment code.
regmatch(): nextchar should always be positive

Remove the one bit of code that tests for < 0, and put in a
general assert.
regmatch(): do nextchr=*locinput at top of loop

Currently each branch in the main regmatch() loop is responsible
re-initialising nextchar to UCHARAT(locinput) if locinput is modified.

By adding
    nextchr = UCHARAT(locinput);
to the head of the loop, we can remove most of the nextchar assignments
in the individual branches. We lose slightly for the zero-width assertions
like \b which will re-read the same nextchar, but this will make it
easier to handle non-null-terminated strings.
regmatch() annotate ops and separate out branches

Annotate each 'case OP:' in the main switch in regmatch() to show
what regex pattern this implements. About half the ops had already been
done. Also add a blank line between each 'case' statement for readability.
(no code changes)
regmatch(): fix typo in TRIE commentary text
stop regex engine reading beyond end of string

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.
[MERGE] make regex engine handle non-null-terminated strings