| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
In April 2003 commit f2095865e3489f4e:
Noted by Nat: -0 didn't work that well with Unicode.
added support for passing hexadecimal to the -0 option. As '-0' has an
optional argument, the chosen syntax for hex was ambiguous with '-0' clustered
with an '-x' option with an argument, so the heuristic described here was
implemented.
|
|
|
|
|
|
|
|
| |
Use ->pCalloc instead of ->pMalloc followed by Zero()
This commit is analogous to the change in perl_alloc() in the previous
commit - the order of S_init_tls_and_interp() and Zero() can be swapped,
at which point the change to use "calloc" is obvious.
|
|
|
|
|
|
|
| |
`INIT_TRACK_MEMPOOL` is defined as a no-op if `PERL_TRACK_MEMPOOL` is not
defined, so no need to wrap it in `#ifdef`.
Spotted by Ilmari.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous code
1) allocated memory with PerlMem_malloc()
2) passed the pointer to S_init_tls_and_interp()
3) called Zero() or ZeroD()
4) optionally invoked INIT_TRACK_MEMPOOL()
5) returned the pointer
ZeroD() and Zero() are equivalent, apart from the return value of the
expression.
The layers of functions and macros obscured what what was actually
happening, and what the ordering dependencies are:
* S_init_tls_and_interp() uses only the address of the pointer
* Zero() zeros the memory
* Only INIT_TRACK_MEMPOOL() touches the contents
* all the "memory wrap" macros inside the other macros can't "trigger"
Hence the order of Zero() and S_init_tls_and_interp() can be swapped,
at which point Zero() immediately follows malloc(), meaning that the two
should be be replaced with calloc().
This simplifies the function considerably.
|
|
|
|
| |
This replaces an hv_exists/hv_store pair with a single LVALUE hv_fetch.
|
| |
|
| |
|
|
|
|
|
| |
Also use HvTOTALKEYS() instead of HvKEYS(), as the latter makes a check for
placeholders, which here cannot make a difference.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the removal of PERL_OBJECT
(acfe0abcedaf592fb4b9cb69ce3468308ae99d91) PERL_IMPLICIT_CONTEXT and
MULTIPLICITY have been synonymous and they're being used interchangeably.
To simplify the code, this commit replaces all instances of
PERL_IMPLICIT_CONTEXT with MULTIPLICITY.
PERL_IMPLICIT_CONTEXT will stay defined for compatibility with XS
modules.
|
| |
|
|
|
|
|
|
|
| |
This is a rebasing by @khw of part of GH #18792, which I needed to get
in now to proceed with other commits.
It also strips trailing white space from the affected files.
|
|
|
|
|
| |
The format is '%s', so it is not appropriate to wrap the char * arguments
in SVfARG().
|
|
|
|
|
|
| |
Check that porting/copyright.t is passing when run with --now:
../perl -I../lib porting/copyright.t --now
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This feature allows documentation destined for perlapi or perlintern to
be split into sections of related functions, no matter where the
documentation source is. Prior to this commit the line had to contain
the exact text of the title of the section. Now it can be a $variable
name that autodoc.pl expands to the title. It still has to be an exact
match for the variable in autodoc, but now, the expanded text can be
changed in autodoc alone, without other files needing to be updated at
the same time.
|
| |
|
|
|
|
|
| |
This uses a new organization of sections that I came up with. I asked
for comments on p5p, but there were none.
|
|
|
|
|
| |
apidoc_section is slightly favored over head1, as it is known only to
autodoc, and can't be confused with real pod.
|
| |
|
|
|
|
| |
These were only ever needed by Symbian.
|
|
|
|
|
| |
It only does anything under PERL_GLOBAL_STRUCT, which is gone.
Keep the dNOOP defintion for CPAN back-compat
|
|
|
|
|
|
|
|
| |
This was originally added for MinGW, which no longer needs it, and
only still used by Symbian, which is now removed.
This also leaves perlapi.[ch] empty, but we keep the header for CPAN
backwards compatibility.
|
|
|
|
|
| |
Also eliminate USE_HEAP_INSTEAD_OF_STACK and
SETSOCKOPT_OPTION_VALUE_T, since Symbian was the only user of those.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This resolves #17774.
This ticket is because the fixes in GH #17154 failed to get every case,
leaving this one outlier to be fixed by this commit.
The text in https://github.com/Perl/perl5/issues/17154 gives extensive
details as to the problem. But briefly, in an attempt to speed up
interpreter cloning, I moved certain SVs from interpreter level to
global level in e80a0113c4a8036dfb22aec44d0a9feb65d36fed (v5.27.11,
March 2018). This was doable, we thought, because the content of these
SVs is constant throughout the life of the program, so no need to copy
them when cloning a new interpreter or thread. However when an
interpreter exits, all its SVs get cleaned up, which caused these to
become garbage in applications where another interpreter remains
running. This circumstance is rare enough that the bug wasn't reported
until September 2019, #17154. I made an initial attempt to fix the
problem, and closed that ticket, but I overlooked one of the variables,
which was reported in #17774, which this commit addresses.
Effectively the behavior is reverted to the way it was before
e80a0113c4a8036dfb22aec44d0a9feb65d36fed.
|
|
|
|
|
| |
Mostly in comments and docs, but some in diagnostic messages and one
case of 'or die die'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v5.31.9-156-g94c8b9c1f0 introduced the free_and_set_cop_warnings()
macro. It's first argument expects a COP rather than a COP*. Its usage
in S_restore_cop_warnings(() is to modify PL_cucop, but in order to pass
a COP rather than a COP*, the original commit made a local copy of
PL_curcop and ended up inadvertently updating the copy instead.
This commit changes the maco so it expects a COP*, and updates the bulk
of its callers to use &PL_compiling rather than PL_compiling, and fixes
up S_restore_cop_warnings().
The symptoms were ASAN failures in a few test scripts including
uni/parser.t and ext/XS-APItest/t/handy0*.t.
(The S_restore_cop_warnings() function was only used by
Perl__force_out_malformed_utf8_message(), so didn't cause many issues
outside of test scripts which forced such "malformed "errors).
|
|
|
|
|
| |
This is avoiding the boilerplate to free
the cop_warning string when setting it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit added a mutex specifically for protecting against
simultaneous accesses of the environment. This commit changes the
normal getenv, putenv, and clearenv functions to use it, to avoid races.
This makes the code simpler in places where we've gotten burned and
added stuff to avoid races. Other places where we haven't known we were
getting burned could have existed until now. Now that comes
automatically, and we can remove the special cases we earlier stumbled
over.
getenv() returns a pointer to static memory, which can be overwritten at
any moment from another thread, or even another getenv from the same
thread. This commit changes the accesses to be under control of a
mutex, and in the case of getenv, a mortalized copy is created so that
there is no possible race.
|
| |
|
|
|
|
|
|
|
|
|
| |
Old glibc versions had a buggy modulo implementation for 64 bit
integers on 32-bit architectures. This was fixed in glibc 2.3,
released in 2002 (the version check in the code is overly cautious).
Removing the alternate PP function support is left for the next
commit, in case we need to resurrect it in future.
|
|
|
|
|
|
|
| |
check that porting/copyright.t is passing when
run with --now
../perl -I../lib porting/copyright.t --now
|
|
|
|
|
|
|
| |
This replaces strchr("list", c) calls throughout the core. They don't
work properly when 'c' is a NUL, returning the position of the
terminating NUL in "list" instead of failure. This could lead to
segfaults or even security issues.
|
|
|
|
|
| |
and the associated commits, at least until a way to make
wrap_op_checker() work is available.
|
|
|
|
| |
Fixes issue #14816
|
|
|
|
| |
This is for Devel::PPPort.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of fixing gh #17154
This scenario from the ticket
(https://github.com/Perl/perl5/issues/17154#issuecomment-558877358)
shows why this fix is necessary:
main interpreter initializes PL_AboveLatin1 to an SV it owns
loads threads::lite and creates a new thread/interpreter which
initializes PL_AboveLatin1 to a SV owned by the new interpreter
threads::lite child interpreter finishes, freeing all of its SVs,
PL_AboveLatin1 is now invalid
main interpreter uses a regexp that relies on PL_AboveLatin1, dies
horribly.
By making these interpreter level variables, this is avoided. There is
extra copying, but it is just the SV headers, as the real data is kept
as static C arrays.
|
|
|
|
|
|
|
| |
Currently, whether the OS-level signal handler function is declared as
1-arg or 3-arg depends on the configuration. Add explicit versions of
these functions, principally so that POSIX.xs can call which version of
the handler it wants regardless of configuration: see next commit.
|
| |
|
|
|
|
| |
This is part of this branch of changes.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 2773b4f50f991900e38d33daace2b9c6a0902c6a.
I haven't made much progress in resolving the problems this produces
downstream, so rather than leaving it broken, I'll revert it until
they can be solved.
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 857320cbf85e762add18885ae8a197b5e0c21b69,
re-instating the [perl #2754] fix, which was reverted in late
2017 to allow Module::Install based distributions to update or
re-work per [perl #132577].
# Conflicts:
# t/op/blocks.t
|
|
|
|
| |
and update eval_pv() to use it.
|
|
|
|
|
| |
This environment variable was previously only checked for on DEBUGGING
builds.
|
|
|
|
|
| |
Remove WinCE support as agreed in the thread starting here:
https://www.nntp.perl.org/group/perl.perl5.porters/2018/07/msg251683.html
|
|
|
|
| |
This would allow to rethrow object exceptions.
|