| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The deprecated warnings were getting suppressed, but literal '{' in
patterns needs to be escaped.
|
|
|
|
| |
This has been deprecated since v5.22
|
| |
|
| |
|
|
|
|
|
| |
This comes from our increased understanding of their perils, given
ticket #127708
|
|
|
|
|
|
|
| |
This function was implemented as of 5.21.4, but not exported (even by
request). It's too late in the 5.24 freeze for it to be exported by default,
or as part of a tag, but we can at least make it available to those who want
to import it by name.
|
| |
|
|
|
|
|
|
| |
No POSIX open in Win32, broken by ed6087adbd9c90b59cf3f08af7c23a947c00bf69
Use the PerlLIO_open3 as suggested by Tony Cook, use the same trick as POSIX.xs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[perl #127543]
On some platforms, the use of dtrace / SystemTap requires generating an
extra .o file from a list of .o files before linking. For example,
cc -o foo a.o b.o c.o
has to be replaced with
dtrace -G -s dtrace.d -o dtrace.o a.o b.o c.o # creates dtrace.o
cc -o foo dtrace.o a.o b.o c.o
On Solaris in particular, "dtrace -G" modifies the *.o files that it's
passed as well as creating dtrace.o, and all the new/updated .o files need
to be linked together at the same time from the same single use of "dtrace
-G".
This complicates matters when building all of miniperl, libperl and perl,
and the reason for this commit is that once a dtrace probe made its way
into an inline static function via the recent context work, Solaris
stopped building under -Dusedtrace -Duseshrplib.
The fix that seems to work under both Solaris and Linux, for all
4 permutations of -Dusedtrace +/- -Duseshrplib, is (approx):
# compile all the *.o's, then:
# build miniperl:
$ dtrace ... -o dtrace_mini.o a.o b.o c.o perlminimain.o
$ cc -o miniperl dtrace_mini.o a.o b.o c.o perlminimain.o
# build libperl.a or .so:
$ dtrace ... -o dtrace_perllib.o a.o b.o c.o
$ ar rcu libperl.a dtrace_perllib.o a.o b.o c.o
# build perl:
$ dtrace ... -o dtrace_main.o perlmain.o
$ cc -o perl dtrace_main.o -lperl
This is has only recently arisen because we switched from PUSHSUB()
etc macros to S_cx_pushsub() etc inline functions, which contain
probes. Since the inline static functions, and hence the probes, are now
included in every source file, and since Solaris isn't smart enough to
remove inline static fns that aren't used in a particular compilation
unit, the probes end up getting used in every source file (at least where
PERL_CORE is true).
It also required fixing up XS-APItest's Makefile.PL, since one object
file is compiled using PERL_CORE.
|
|
|
|
|
| |
On Solaris:
"APItest.xs", line 1519: warning: integer overflow detected: op "<<"
|
|
|
|
| |
Mostly these are too long verbatim lines.
|
| |
|
| |
|
|
|
|
| |
Tony Cook suggested this fix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- remove trailing whitespace
- consistently refer to builtins as C<foo>, not foo() or C<foo()>
- hyperlink each C<foo> builtin to its section in perlfunc
- replace some occurrences of -w with a reference to the warnings pragma
- refer to listy comma as "list concatenation" because that's what it
does
- consistently hyperlink references to external programs (L<touch(1)>),
system calls (L<fork(2)>), and library functions (L<fdopen(3)>)
- hyperlink variables to their section in perlvar
- hyperlink the names of modules/pragmas
- hyperlink names of functions provided by modules (where possible)
- consistently use "pragmas", not "pragmata" (there were only two of
those)
- use the same wording for all conditional builtins / features
- -T and -B are file tests, not switches
- remove "see L</open>" (regarding the ':encoding' layer) from
description of binmode because I don't see why it was there
- refer to variables as C<$foo>, not $foo
- hyperlink some error messages to perldiag
- remove & from subroutine calls
- grammar: write "if X, Y" with a comma and "Y if X" without
- use 'my' in examples when introducing new variables
- 'while (', not 'while('
- don't capitalize the next word after a semicolon
- consistently start error messages (die/warn) with "Can't" (not
"can't", "Cannot", or "cannot")
- replace bareword filehandles by normal variables in examples
- add missing ')'
- fix module names: IPC::SysV::Msg -> IPC::Msg, IPC::SysV::Semaphore ->
IPC::Semaphore
- 'open': replace note about binmode with equivalent paragraph from
'binmode' (the one in 'open' claimed unix systems don't need binmode,
which is not true with encodings)
- 'open': delete overly clever example of generating filehandle names in
a recursive function (this is a non-issue with lexical filehandles)
- 'open': instead of running 'perl -V' and looking for the useperlio
line, you can just run 'perl -V:useperlio'
- 'open': mention shell feature of 'yourscript.pl <( other command )',
which makes the only remaining use of 2-arg open redundant
- 'open': sysopen uses different modes than open; they're not "subtly
different" and there's no "may" about it
- 'open': use $fh->autoflush(1) instead of select/$| dance (especially
since the example already loads IO::Handle for no reason)
- 'printf': remove garbled text ("Look for this throught pod")
- change "use locale 'not_characters'" to the correct "use locale
':not_characters'"
- (hopefully) fix inconsistent use of "real filehandle"; use "bareword
filehandle" instead to distinguish from scalar variables / globrefs
- ":encoding" is a layer, not a pragma
- 'readline': actually use readline in examples
- ?...? is no longer valid; use m?...? instead
- 'sort': whether the algorithm is stable has no effect on runtime
complexity, so "That algorithm was not stable, so I<could> go
quadratic" is nonsense
- 'sort': declaring $a/$b as lexicals is an error regardless of strict
- 'sysopen': as far as I can tell the note about depending on fdopen()
is only true for non-PerlIO builds
- 'use': add an example of what 'use Module VERSION' expands to
- add 'select FILEHANDLE' to filehandle related functions
Also touch ext/Pod-Functions/Functions_pm.PL to make it parse
L<C<foo>|...> in the overview paragraphs.
And teach t/porting/podcheck.t about a ton of man pages and some
external modules.
|
|
|
|
|
| |
Win32CORE.c: In function ‘boot_Win32CORE’:
../../XSUB.h:127:43: warning: unused parameter ‘cv’ [-Wunused-parameter]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some platforms (probably only VMS and Android at the moment) take
special steps via the function DynaLoader::mod2fname to construct
a dynamic library name that will be unique and (if too long)
truncated. Then DynaLoader looks for a bootstrap file with the
exact same name as the dynamic library except with a .bs file
extension.
However, ExtUtils::MakeMaker has never produced bootstrap files
that have been run through mod2fname, so while a Foo:Bar extension
would produce a loadable library named PL__Foo_Bar.exe, the
bootstrap would be called Bar.bs. That shouldn't be a problem
since the bootstrap file is just Perl code read by Perl, but
DynaLoader has (apparently forever) been looking for
PL__Foo_Bar.bs and not finding it. So let's look for it by the
name under which it actually exists.
There are no core extensions that produce non-empty bootstrap
files and no existing test coverage, but as-yet-unintegrated
versions of MakeMaker do have such tests. See, for example,
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/7f5e9a35addeea7ebfcded28277c85f723e1a5de
|
|
|
|
|
| |
The functions like isalnum() have been scheduled for removal in 5.24.
This does that.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're already keeping destroy_gen there, so keep the CV there too.
The previous implementation, introduced in 8c34e50d, kept the
destroy method cache in the stash's stash, which broke B's SvSTASH
method.
Before that, the DESTROY method was cached in overload magic.
A previous version of this patch didn't clear the destructor cache on
a clone, which caused ext/XS-APItest/t/clone_with_stack.t to fail.
|
|
|
|
|
|
|
| |
RT 126410: This may not be a B bug but we have no test coverage for SvSTASH at
the moment. TODO the test until it is working correctly.
TonyC: fix syntax error and update MANIFEST
|
| |
|
|
|
|
|
|
|
|
| |
CID 135006: Constant expression result (CONSTANT_EXPRESSION_RESULT)
The Coverity 'detail' is priceless:
always_true_or: The "or" condition strcmp(strings->name, "decimal_point") || strcmp(strings->name, "thousands_sep") || strcmp(strings->name, "grouping") will always be true because strings->name cannot be equal to two different values at the same time, so it must be not equal to at least one of them.
|
|
|
|
|
| |
Not directly an open Coverity issue (though previously we have had
similar ones) but inspired by the similar change for signal numbers.
|
|
|
|
|
|
|
|
|
|
|
| |
CID 135020: Argument cannot be negative (NEGATIVE_RETURNS)
CID 135021: Argument cannot be negative (NEGATIVE_RETURNS)
sigismember()
sigaddset()
sigdelset()
Note that sigaction() already has its own handling for the signal number.
|
|
|
|
| |
Coverity CID 135019: Argument cannot be negative (NEGATIVE_RETURNS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity CID 135022: Argument cannot be negative (NEGATIVE_RETURNS)
Coverity CID 135027: Time of check time of use (TOCTOU)
Replace use of stat()-guarded use of creat() (wow) with open(...O_EXCL...)
(when O_CREAT) so that there is no race condition (TOCTOU) window
between the stat() check for non-existence (which can fail also for
other reasons) and the two (sic) creat() calls.
Similarly, without O_CREAT, use open(...O_RDONLY...) instead of the stat().
Possible problem: arguably, systems old enough to be still using
ODBM_File (or requiring creat()) might not have the O_EXCL.
|
|
|
|
| |
Seen in OpenBSD 4.8, but found no mention of this working in 5.x.
|
| |
|
|
|
|
| |
More importantly: that apostrophe messed up my Emacs' syntax highlighting.
|
|
|
|
| |
The fma() also missing not_here().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
About 25 commits ago in this branch I added a commit:
MULTICALL should clear scope after each call
To fix RT #116577, which reported that lexicals were only being freed
at the end of the MULTICALL, not after each individual call to the sub.
In that commit, I added a LEAVE_SCOPE() to the end of the MULTICALL()
definition. However, after further thought I realise that's wrong. If a
multicall sub does something like { my $x = $_*2; $x }, then the returned
value would be freed before the XS code which calls MULTICALL() has a
chance to do anything with it (e.g. test for truth, or add it to the return
args or whatever).
So I think popping the save stack should be the responsibility of the
caller of MULTICALL(), rather than of MULTICALL() itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dMULTICALL declares several vars that are used either to maintain
state across multiple calls, or to pass values to PUSHSUB etc, where
those macros expected to obtain some of their args by values being
implicitly passed via local vars. Since PUSHSUB has been replaced by
cx_pushsub() which now has all parameters explicitly passed, there is
no longer any need for those vars. So this commit eliminates them:
newsp
hasargs
There are also a couple vars which are no longer used due to changes to
the implementation over time; these can also be eliminated:
cx multicall_cv
Finally, this branch introduced a new var, saveix_floor; rename it to
multicall_saveix_floor for consistency with other dMULTICALL vars.
Although none of these vars are listed in the documentation, its possible
that some code out there may rely on them in some way, and will need to be
fixed up.
|
|
|
|
|
|
| |
Replace CX_PUSHBLOCK() with cx_pushblock() etc.
No functional changes.
|
|
|
|
|
|
|
| |
RT #116577
Lexicals etc were only being freed at the end of the MULTICALL, not
after each individual call to the sub.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename all the context-popping macros such as POPBLOCK and POPSUB, by
giving them a CX_ prefix. (Do TOPBLOCK too).
This is principally to deliberately break any existing non-core use of
these non-API macros, as their behaviour has changed in this branch.
In particular, POPBLOCK(cx) no longer decrements the cxt stack pointer
nor sets cx; instead, cx is now expected to already point to the stack
frame which POPBLOCK should process.
At the same time, giving them a CX_ prefix makes it clearer that these
are all part of a family of macros that manipulate the context stack.
The PUSHFOO() macros will be renamed in a later commit.
|
|
|
|
|
| |
Make the unwinding and freeing of the old interpreter up to date
with the latest handling of PL_scopestack.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In void context, pp_leavesub() doesn't bother resetting SP to the
base; either as an efficiency measure, or as an oversight (the other
pp_leavefoo functions do reset).
This is mostly harmless, as being void context, it's likely to immediately
execute pp_nextstate or similar, which will reset the stack anyway.
However with attributes, something like
my @foo :attr = ()
causes attributes::import() to be called in void context, and whatever
dross it leaves on the stack becomes part of the assign, i.e. that assign
becomes the equivalent of:
my (@foo, dross) = ()
which again is fairly harmless, if slightly inefficient.
However, the next commit should make pp_leavesub() call FRETMPS,
which means that 'dross' may now include freed SVs, which will make
pp_aassign choke.
This commit also requires ext/XS-APItest/t/call.t to be fixed.
Some tests in there (added years ago by myself) test the statu quo; that
is, it expects that calling call_sv(G_VOID) will leave return args on the
stack. Now it doesn't.
|
|
|
|
|
|
|
|
|
|
| |
A couple of places were expecting dounwind(-1); LEAVE_SCOPE(0);
to restore PL_tmps_floor, since its old value was saved on the savestack.
Since that's now stored in the context struct instead, do
a POPBLOCK(&cxstack[0]).
This problem only showed up on 'make test' rather than 'make
test_harness', since only the former sets PERL_DESTRUCT_LEVEL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ perl -Dst -e'eval"1"'
Gives:
....
((eval 1):1) leaveeval
=> (FREED)
Change it so that like all the other pp_leavefoo() functions, it does
if (gimme == G_VOID)
PL_stack_sp = newsp;
I can't think of any (non-debugging) perl-level badness the old behaviour
can be shown to demonstrate, but best not to have freed values left
dangling.
This also allows pp_leaveeval() to (like the other pp_leavefoo functions)
avoid doing a dSP with the associated unnecessary PUTBACKs and SPAGAINs.
Finally, the code to detect a false require is moved to earlier in the
function where it's in the same place as the rest of the stack arg
processing code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally at the start of a 'for' iteration (pp_enteriter), we store the
address of the GV or the address of the pad slot of the iteration variable
in the CX struct, so we can quickly access and update it in pp_iter. For
the ITHREADS case however, the pad may change if the thread is cloned, so
instead the address of PL_comppad was stored, and then updated during
cloning. This meant that on each iter, we would have to retrieve the saved
PL_comppad address from the ctx struct, retrieve the targ from the saved
my_op, and do a (perlish) array indexing.
Thuis commit makes this faster by, for the ITHREADS case, storing both
PL_comppad and svp = &PLcurpad[targ]. In pp_iter(), we're fast by directly
accessing *svp; while storing PL_comppad allows us to update both it and
svp during thread cloning.
This requires one extra pointer in the block_loop part of the context
union under threads, but this is already smaller than some other parts of
the union, so has no effect.
Note that the oldcomppad field was formerly part of the itervar_u union,
but is now a separate field within the larger block_loop struct (but only
on threaded builds).
Note also that the tests I've added I retrieved from an old WIP private
branch that contained a forerunner of this commit, so they may not be
entirely relevant to the current form of this commit. But extra tests
can never hurt, so I've included them.
|
|
|
|
|
| |
This should avoid the "pointer targets in assignment differ in
signedness" warning that pops up in some configurations.
|
| |
|
| |
|
|
|
|
|
|
| |
alloca is the newer "standardized" name which modern VCs support.
In VC 6, only _alloca exists, which is the prestandardized name, use it to
fix a linker failure.
|
|
|
|
|
|
|
|
| |
This reverts commit ef18391745841fb1df298cec3a3001be4237fb3d.
This commit was intended only to diagnose Jenkins build issues, I now
have better access to Jenkins (and the new diagnostics didn't tell me
much anyway.)
|
|
|
|
|
|
|
|
| |
These are all specified by POSIX/SUSv3, but not all platforms have them,
as mentioned in POSIX.pm.
We can only test the pid, uid and code fields, since they are the only
ones that are defined for a user-sent signal.
|
|
|
|
|
| |
Mention them in the sigaction documentation, and document the 'addr'
field.
|
|
|
|
| |
Some of this will be removed once we work out what's going on.
|
|
|
|
|
| |
These are the last remaining uses outside the interwoven mess in
S_openn_cleanup, openn_setup, and their callers in doio.c.
|
| |
|