| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Using class attributes in the unit class syntax was a syntax error. This change makes the following two lines equivalent:
class B :isa(A) ;
class B :isa(A) { }
Addresses GH issue #20888.
|
|
|
|
|
|
| |
Add Changes, Makefile.PL and examples directory.
Fixes this module for https://github.com/Perl/perl5/issues/20874
|
| |
|
|
|
|
|
|
| |
We were only handling '.tar.gz' files, but Config::Perl::V
uses '.tgz' so when we ran the sync script got very confused
and deleted everything and then tried to add the raw archive.
|
|
|
|
|
|
| |
Adds Changes, Makefile.PL, and examples/semaphore.pl
Fixes this module for https://github.com/Perl/perl5/issues/20874
|
|
|
|
|
|
| |
Fixes https://github.com/Perl/perl5/issues/20874 for this module
Tweaked Makefile.PL to set the license to 'perl_5' and not 'perl'
|
|
|
|
|
|
| |
This fixes this module for https://github.com/Perl/perl5/issues/20874
Tweaked Makefile.PL to set the LICENSE to 'perl_5' and not 'perl'
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a Makefile.PL for Attribute-Handlers in core so that it can be
maintained properly. This avoids the need for an external repo to
maintain these extra files.
Taken from Attribute-Handlers-0.99, with the following modifications:
- install in site, not perl
- Fix license, and don't try to handle ancient perl or EUMM versions
- update metadata URLs
- no indexing demo directory
|
|
|
|
|
|
|
|
| |
Fixes this module for https://github.com/Perl/perl5/issues/20874
Note the Makefile.PL was tweaked a bit to install into the right place
depending on version, and with an added comment. There are some very
old perls listed here.
|
|
|
|
|
|
|
| |
For some reason the CPAN module is not properly indexed. It is
https://metacpan.org/release/SBURKE/I18N-LangTags-0.35.
This fixes this module for https://github.com/Perl/perl5/issues/20874
|
|
|
|
|
|
|
|
| |
Files copied from https://github.com/rurban/Net-Ping
with minor changes made to point at the perl5 repo as we are upstream,
also changed the INSTALLDIRS rule to make the other files.
This fixes the module for https://github.com/Perl/perl5/issues/20874
|
|
|
|
| |
Fixes https://github.com/Perl/perl5/issues/20874 for this module
|
|
|
|
|
|
|
| |
This trivial function should get optimized out. But I couldn't get it
to work for Windows, because the two likely hdr files don't have
PL_thr_key defined in them. I suppose a new hdr file could be created
that gets included later. But I didn't think it was worth it.
|
|
|
|
| |
This trivial function will likely get optimized out
|
|
|
|
|
|
| |
I had thought that the 's' flag was sufficient for making a function
inline. But because of PERL_NO_INLINE_FUNCTIONS, the 'i' flag is also
needed.
|
| |
|
|
|
|
|
|
|
|
|
| |
This happens only in the unlikely event that localeconv() isn't present
on the system.
There are two ways used in this file to announce the lack of system.
This commit converts to the other way than previously, and the warning
goes away.
|
|
|
|
|
|
|
| |
Explain in detail why the return arg on the stack from the eval can't be
NULL on successful compilation.
(Spotted by Hugo)
|
| |
|
|
|
|
|
| |
Yes, "or about 69 N 89 E, in the frozen wastes of Siberia."
but must reveal the crucial missing step involved!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function handles perl -Dsv, producing output like
STACK 0: MAIN
CX 0: BLOCK =>
CX 1: SUB => UNDEF PV("main"\0)
retop=leave
STACK 1: MAGIC
CX 0: SUB => IV(1)
When a CX stack had zero contexts pushed (like can sometimes happen
when something has just done a PUSHSTACKi() and no op has pushed a BLOCK
or SUB or whatever yet), then the code for determining where the next
markstack pointer is (by peeking ahead into the first CX of the next SI)
was accessing random garbage at cx[0]. This commit fixes that.
|
|
|
|
|
|
|
|
|
|
|
| |
A test recently added to check reference count of a stored AV element
had to account for extra reference counts from the temporary refs
generated by
if (\$a[0] == \$j) { ... }
Instead, calculate this boolean value in a separate statement so the ref
counts are easier to understand.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This XS function is for testing the stack-extending EXTEND() macro.
This commit fixes two issues.
1) it uses a nested 'sp' variable declaration in addition to the one
declared implicitly, which is confusing. Use a separate variable called
new_sp instead. This changes the logic slightly, since the EXTEND()
macro messes implicitly with sp, including updating it after a realloc.
We have to do that manually now with new_sp.
2) The test function NULLs a couple of items near the top of the
(potentially just extended) stack. Where the extend size is zero, it
could be NULLing out one or two of the passed arguments on the stack.
At the moment these values aren't used any more and are discarded on
return; but it will get messy once the stack becomes reference-counted,
so only NULL addresses if they're above PL_stack_sp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like the previous commit which did it for amagic_call() and call_sv(),
this commit makes executing the faked-up OP_ENTEREVAL be executed as
part of the runops loop rather than as a separate call. This is to allow
shortly fixing up for a reference-counted stack. (CALLRUNOPS() will
reify the stack if necessary, while the raw call to pp_entereval() won't
fix up the stack unless its part of the runops loop too.)
However, this is a bit more complex than call_sv() etc in that there is
a good reason for calling pp_entereval() separately. The faked up
OP_ENTEREVAL has its op_next set to NULL - this is the op which would
normally be returned on failure of the eval compilation. By seeing
whether the retuned value from pp_entereval() is NULL or not, eval_sv()
can tell whether compilation failed.
On the other hand, if pp_entereval() was made to be called as part of
the runops loop, then the runops loop *always* finishes with PL_op set
to NULL. So we can no lo longer distinguish between compile-failed and
compile-succeeded-and-eval-ran-to-completion.
This commit moves the entereval into the runops loop, but restores the
ability to distinguish in a slightly hacky way. It adds a new private
flag for OP_ENTEREVAL - OPpEVAL_EVALSV - which indicates to
pp_entereval() that it was called from eval_sv(). And of course
eval_sv() sets this flag on the OPpEVAL_EVALSV op it fakes up. If
pp_entereval() fails to compile, then if that flag is set, it pushes a
null pointer onto the argument stack before returning.
Thus by checking whether *PL_stack_sp is NULL or not on return from
CALLRUNOPS(), eval_sv() regains the ability to distinguish the two
cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These two functions do a slightly odd thing (which has been present
since 5.000) when calling out to a CV: they half fake up an OP_ENTERSUB,
then call pp_entersub() directly, and only then if it returns a non-null
PL_op value, execute the rest of the ops of the sub within a
CALLRUNOPS() loop.
I can't find any particular reason for this. I guess it might make
calling XS subs infinitesimally faster by not have to invoke the runops
loop when only a single op is executed (the entersub), but hardly seems
worth the effort.
Conversely, eliminating this special-case makes the code cleaner, and
it will allow the workarounds planned to be added shortly (to the runops
loops for reference-counted stacks) to work uniformly. Without this
commit, pp_entersub() would get called before runops() has had a chance
to fix up the stack if necessary.
So this commit *fully* populates the fake OP_ENTERSUB (including type
and pp address) then causes pp_entersub to be invoked implicitly from the
runops loop rather than explicitly.
|
|
|
|
|
|
|
| |
This test looks for a 'Use of freed value in iteration' warning, which
will soon disappear when this branch makes the stack reference counted.
Make the test more modifiable so that it can be made conditional on
build options.
|
|
|
|
|
|
| |
'av' is in scope both for the whole function, and for a small block
within that function. Rename the inner variable to av0 to avoid
confusion.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is a bit of mess.
It gets the label string either from the op, or for OPf_STACKED, from
the SV at the top of the stack. This commit reduces the amount of
OPf_STACKED tests and repeated stack accesses for the label SV (even
after it's notionally been popped off the stack!)
By simplifying the code, it will also make it easier to make the changes
necessary for a reference-counted stack.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In something like
for $package_var (....) { ... }
or more experimentally,
for \$lvref (....) { ... }
when entering the loop in pp_enteriter, perl would pop the GV/LVREF off
the stack, but didn't bump its refcount. Thus it was possible (if
unlikely) that it could be freed during the loop. In particular this
crashed:
$f = "foo";
for ${*$f} (1,2) {
delete $main::{$f}; # delete the glob *foo
...;
}
This will become more serious when the stack becomes refcounted, as
popping something off the stack will trigger a refcount decrement on it
and thus a possible immediate free of the GV.
This commit future-proofs for loops against this by ensuring that
the refcount of the SV referred to by cx->blk_loop.itervar_u.svp is
appropriately bumped up / down on entering / exiting the loop.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Perl_leave_adjust_stacks(), which is called by all the scope-exiting ops
(pp_leave, pp_leavesub etc), handles scalar context by updating the list
of SVs on the stack to be returned to be just the one-item list at the
top of the stack (all other items on the stack being discarded).
For the special case of scalar context and no items on the return list,
it instead puts &PL_sv_undef at the lowest point on the stack and skips
most of the rest of the function. The rest of the function includes
things like shuffling down any args to be returned, which obliterates
any other stuff on that stack that needs discarding. For example in
for (qw(a b c)) { ....; return qw(x y z); ... }
the stack contains a b c x y z; the a,b,c need discarding and the x,y,z
shifting down.
This commit removes the 'skip rest' special behaviour, and makes scalar
return of an empty list behave the same as a scalar return of a
non-empty list. So it pushes &PL_sv_undef at the top of the stack,
then goes through the normal "shift and copy the top arg down the stack"
code path.
This is slightly less efficient, but this is relatively rare condition,
and will make converting Perl_leave_adjust_stacks() to handle a
reference-counted stack easier.
|
|
|
|
|
| |
A few places were calling pp_pushmark(), when they should have been just
directly doing a PUSHMARK()
|
|
|
|
|
|
|
|
| |
This field is used on DEBUG_LEAKING_SCALARS builds to track the file
where the SV was allocated. When freeing the SV, the string was
freed but the pointer was left pointing at the freed string.
So NULL it out.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tryAMAGICftest_MG() macro was doing two checks:
1) seeing whether the filetest operator's arg (*PL_stack_sp) looks
to have magic or be a reference,
2) and if the op has children (which will have pushed an arg, unlike
(-X _),
If both are true, then do full-on magic and/or overload processing.
The problem with this is that it checks the arg *before* checking whether
there's even an arg. Thus in the case of (-X _), it is actually examining
a random SV on the stack (or in the case of nothing on the stack,
examining the PL_sv_undef pointer always stored at PL_stack_base[0] as a
guard.)
It turns out this was harmless - the test for (1) will examine a random
(but real) SV and get garbage results, but then the 2nd test will fail
anyway, so overloading won't be called.
So the fix is to swap the (1) and (2) test order.
In addition, I changed the 'has an argument' test from OPf_KIDS to
!OPf_REF. These should be mutually exclusive, but the OPf_REF flag
formally indicates (-X _), i.e. that no arg has been pushed on the
stack. Whether the op has children or not could potentially change in
the future, independent of whether it's the (-X _) form.
So overall this commit makes no visible functional difference, but may
make the code more robust against future changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The R modifier to the stack debugging switch -Ds already
indicates if an SV's refcount is > 1 or SvTEMP is set (T), or the
SV is on the temps stack without SvTEMP set (t), e.g.:
=> IV(101), <2>IV(102), <T>IV(103) <3t>IV(104)
With this commit, it displays SVs with the SvPADTMP flag set as <P>,
e.g.
=> <P>IV(101), <2P>IV(102), <PT>IV(103)
|
|
|
|
| |
Updated to build without warnings on gcc-12.
|
| |
|
|
|
|
|
|
|
|
| |
An enum is supposed to be an int. STRLEN may be too large for that. (I
suspect the cast was inadvertently left in converting from an earlier
implementation that was never released.)
Spotted by H. Merijn Brand.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Silences the following warning:
In file included from HiRes.xs:23:
./ppport.h:14832:1: warning: unused function 'DPPP_my_ck_warner' [-Wunused-function]
DPPP_(my_ck_warner)(pTHX_ U32 err, const char *pat, ...)
^
./ppport.h:11568:21: note: expanded from macro 'DPPP_'
#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
^
./ppport.h:11567:24: note: expanded from macro 'DPPP_CAT2'
#define DPPP_CAT2(x,y) CAT2(x,y)
^
../../config.h:1387:19: note: expanded from macro 'CAT2'
#define CAT2(a,b) PeRl_CaTiFy(a,b)
^
../../config.h:1385:27: note: expanded from macro 'PeRl_CaTiFy'
#define PeRl_CaTiFy(a, b) a ## b
^
<scratch space>:34:1: note: expanded from here
DPPP_my_ck_warner
^
1 warning generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Silence build warning with 32 bit build under clang. Also bump
version.
APItest.xs:7614:24: warning: format specifies type 'unsigned int'
but the argument has type 'U32' (aka 'unsigned long') [-Wformat]
i, hash32, vectors_32[i]);
^~~~~~
../../fakesdio.h:64:50: note: expanded from macro 'printf'
#define printf(fmt,args...) PerlIO_stdoutf(fmt,##args)
~~~ ^~~~
APItest.xs:7614:32: warning: format specifies type 'unsigned int'
but the argument has type 'U32' (aka 'unsigned long') [-Wformat]
i, hash32, vectors_32[i]);
^~~~~~~~~~~~~
../../fakesdio.h:64:50: note: expanded from macro 'printf'
#define printf(fmt,args...) PerlIO_stdoutf(fmt,##args)
~~~ ^~~~
APItest.xs:7835:24: warning: format specifies type 'unsigned int'
but the argument has type 'U32' (aka 'unsigned long') [-Wformat]
i, hash32, vectors_32[i]);
^~~~~~
../../fakesdio.h:64:50: note: expanded from macro 'printf'
#define printf(fmt,args...) PerlIO_stdoutf(fmt,##args)
~~~ ^~~~
APItest.xs:7835:32: warning: format specifies type 'unsigned int'
but the argument has type 'U32' (aka 'unsigned long') [-Wformat]
i, hash32, vectors_32[i]);
^~~~~~~~~~~~~
../../fakesdio.h:64:50: note: expanded from macro 'printf'
#define printf(fmt,args...) PerlIO_stdoutf(fmt,##args)
~~~ ^~~~
4 warnings generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And by removing it we silence the following build warning:
regcomp.c:2285:28: warning: format specifies type 'int' but the argument has type 'I32' (aka 'long') [-Wformat]
parno, RExC_parno_to_logical[parno], RExC_parno_to_logical_next[parno]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./regcomp_internal.h:212:37: note: expanded from macro 'RExC_parno_to_logical'
#define RExC_parno_to_logical (pRExC_state->parno_to_logical)
^
regcomp.c:2285:58: warning: format specifies type 'int' but the argument has type 'I32' (aka 'long') [-Wformat]
parno, RExC_parno_to_logical[parno], RExC_parno_to_logical_next[parno]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./regcomp_internal.h:213:37: note: expanded from macro 'RExC_parno_to_logical_next'
#define RExC_parno_to_logical_next (pRExC_state->parno_to_logical_next)
^
2 warnings generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Silence the following warnings:
dump.c:2688:25: warning: format specifies type 'long long'
but the argument has type 'ssize_t' (aka 'int') [-Wformat]
r->offs[n].start, r->offs[n].end,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./embed.h:831:72: note: expanded from macro 'sv_catpvf'
# define sv_catpvf(a,...) Perl_sv_catpvf(aTHX_ a,__VA_ARGS__)
^~~~~~~~~~~
dump.c:2688:43: warning: format specifies type 'long long'
but the argument has type 'ssize_t' (aka 'int') [-Wformat]
r->offs[n].start, r->offs[n].end,
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
./embed.h:831:72: note: expanded from macro 'sv_catpvf'
# define sv_catpvf(a,...) Perl_sv_catpvf(aTHX_ a,__VA_ARGS__)
^~~~~~~~~~~
2 warnings generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use SSize_t for iterator as it matches the type being compared against.
Silences the following warning:
class.c:555:26: warning: comparison of integers of different signs:
'U32' (aka 'unsigned long') and 'long' [-Wsign-compare]
for(U32 i = 0; i <= AvFILL(superaux->xhv_class_adjust_blocks); i++)
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class.c:699:40: warning: comparison of integers of different signs:
'U32' (aka 'unsigned long') and 'ssize_t' (aka 'int') [-Wsign-compare]
for(U32 i = 0; fieldnames && i <= PadnamelistMAX(fieldnames); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Silence warning about PL_parser. As far as I can tell we do not use it.
In file included from ../../perl.h:28,
from Storable.xs:16:
ppport.h:11564:26: warning: ‘DPPP_dummy_PL_parser’ defined but not used [-Wunused-variable]
11564 | # define DPPP_NAMESPACE DPPP_
| ^~~~~
../../config.h:1385:27: note: in definition of macro ‘PeRl_CaTiFy’
1385 | #define PeRl_CaTiFy(a, b) a ## b
| ^
ppport.h:11567:24: note: in expansion of macro ‘CAT2’
11567 | #define DPPP_CAT2(x,y) CAT2(x,y)
| ^~~~
ppport.h:11568:21: note: in expansion of macro ‘DPPP_CAT2’
11568 | #define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
| ^~~~~~~~~
ppport.h:11568:31: note: in expansion of macro ‘DPPP_NAMESPACE’
11568 | #define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
| ^~~~~~~~~~~~~~
ppport.h:12222:18: note: in expansion of macro ‘DPPP_’
12222 | static yy_parser DPPP_(dummy_PL_parser);
| ^~~~~
|
|
|
|
| |
Otherwise its symbols are missing at link time.
|
|
|
|
|
| |
Change is actually made in regen/feature.pl, then we run 'perl
regen.pl'.
|
| |
|
| |
|
| |
|