| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This reverts commit d190dde9b72a7c306622389007b0dba86901ce52.
Changes in this commit broken `make minitest`, as discovered during
the 5.27.4 release process.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a UTF-8 locale, if the PERL_UNICODE environment variable is set,
perl may add a :utf8 layer.
v5.23.1-197-gfb10a8a deprecated using sysread(), syswrite() etc on such
handles, which meant that a test run under PERL_UNICODE could produce
a significant number of deprecation warnings.
Prevent those warnings, typically by binmode(), but in one case by
disabling the warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The yacc grammar introduced in d3d9da4a7 uses ASSIGNOP to
represent the '=' used to introduce default values in subroutine
signatures, unfortunately the parser returns ASSIGNOP for non-simple
assignments, which allowed:
sub foo ($x += 1) { ... }
to default $x to 1.
Modify yylex to accept only the simple assignment operator after a
subroutine parameter.
I'm not especially happy with the error recovery here.
|
| |
|
|
|
|
|
| |
renameat() on FreeBSD 11 fails if the paths supplied are absolute
paths.
|
|
|
|
|
|
| |
They were causing failures on smoke testers running threaded builds on Linux.
For: RT #132092
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even if in most of the cases it seems ok to print
output during compilation time, this is a pretty
bad idea (when compiling the test for example).
Run all the tests at compile time, but only
print the test status at run time.
(Trailing whitespace cleanup by committer.)
For: RT # 132092
|
|
|
|
|
|
|
|
|
|
|
|
| |
B is already a reserved namespace. This is a bad idea
to use B during unit test, as this increase the complexity
when using one of the B subpackage to run the test.
Simply rename B to BB ( and A to AA ).
(Whitesapce cleanup by committer.)
For: RT # 132092
|
|
|
|
|
|
|
|
|
|
| |
These two tests are not using test.pl
and do not need to load any special file.
No need for fancy setup in BEGIN, all the most
we cannot use the generic set_up_inc helper.
Simply remove the useless BEGIN block.
|
|
|
|
| |
Test plan should not be declared at compile time
|
|
|
|
|
|
| |
I think its better form to call the function after the 'use' statement that
imported the function being called, even though it's available
throughout the enclosing block.
|
|
|
|
|
|
| |
Commit 0e3f4440d849cf8fca676f87e574164e33cf2e13 fixes issue #131868
by silencing a warning which should not happen. This patch checks
that the warning is not happening.
|
|
|
|
|
|
| |
Pod::Simple replaces bytes that aren't valid according to the
document's encoding (declared or auto-detected) \N{REPLACEMENT
CHARACTER}, so catch that.
|
|
|
|
|
| |
The list of pedantic checks was mistakenly nested inside the last
mandatory check.
|
| |
|
|
|
|
|
| |
based in the inode/device numbers when we don't have the *at()
functions.
|
|
|
|
| |
and ensure we (attempt to) clean up the work file
|
|
|
|
| |
and that we clean up the temp file
|
|
|
|
|
| |
The rename work file test will leave the work file, if the other tests
fail for some reason they might also leave files.
|
|
|
|
|
|
|
|
|
|
| |
This avoids trying to rename the work file over the original
multiple times, which could make the implicit (or explicit) close
fail.
This is an incompatibility with the pre-workfile version of in-place
editing, since you could previously fork a child to do process a
given file, but hopefully this is a rare case.
|
|
|
|
| |
This also avoids double closedir()ing the directory handle.
|
| |
|
| |
|
|
|
|
|
| |
test that setuid is preserved with nested in-place editing, which
fails previously.
|
|
|
|
|
| |
Perl's rename implementation falls back to link() to rename when
rename() isn't available, which is either disallowed or dangerous.
|
|
|
|
|
|
|
| |
since Lookup() treats its argument as NUL or '=' terminated.
Previously environment variable names longer than the size of the
buffer would result in a buffer overflow.
|
|
|
|
| |
why reginsert doesnt do this stuff I dont know.
|
| |
|
|
|
|
|
|
| |
This test add coverage for long function names
in order to increase test coverage for
S_parse_gv_stash_name function.
|
|
|
|
|
|
| |
It's conceptually an assignment, which should strengthen any weak refs.
Reported-by: Tom Molesworth <team@cpan.org>
|
|
|
|
| |
and remove an obsolete comment, oops.
|
|
|
|
|
|
|
|
|
|
|
|
| |
rv2gv will return &PL_sv_undef when it can't get a GV, previously
this could cause an assertion failure in mg.c
My original fix for this changed each op that deals with GVs for I/O
to set PL_last_in_gv to NULL if there was no io object in the GV, but
this changes other behaviour as noted by FatherC.
Also partly reverts 84ee769f, which unnecessarily did the same for
readline(), so now we're consistent.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The subref-in-stash optimisation was causing the package name to be
dropped in prototype warnings triggered by the :prototype() attribute
syntax, since the GV containing the stash name and the sub name did
not exist because of the optimisation.
Commit 2eaf799e, which introduced said optimisation, simply did not
include the package name in validate_proto’s ‘name’ parameter, but
just the sub name. This commit makes it tell validate_proto to use
the current stash name.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The:
d = skipspace(d);
can reallocate linestr in the test case, invalidating s. This would
end up in PL_bufptr from the embedded (PL_bufptr = s) in the TOKEN()
macro.
Assigning s to PL_bufptr and restoring s from PL_bufptr allows
lex_next_chunk() to adjust the pointer to the reallocated buffer.
|
|
|
|
|
|
| |
because yywarn calls yyerror with PL_in_eval containing the EVAL_WARNONLY
flag, and yyerror calls Perl_ck_warner_d(aTHX_ packWARN(WARN_SYNTAX),...)
when that flag is set.
|
|
|
|
|
|
| |
Some of the error-producing functions are called with Perl_form(...) as
the first argument. diag.t did not know about this, and was missing
many cases.
|
|
|
|
| |
The code that produces the warnings is in toke.c, after all.
|
|
|
|
|
|
|
| |
In the test case, scan_ident() ends up fetching another line
(updating PL_linestart), and since in this case we don't
successfully parse ${identifier} s (and PL_bufptr) end up being
before PL_linestart.
|
|
|
|
|
|
|
|
|
| |
Previously the /o would be inherited by the second match if the first
match was successful, but only on non-threaded builds.
The op-tree rewriting done on non-threaded builds could also confuse
the interpreter, possibly resulting in the match op receiving
the argument intended for the regcomp op.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the "1e-" in "1e--5" would be treated as "1", but consumed
the "e-".
This wasn't an issue for hex floats.
I considered (and implemented) croaking instead, but this was
inconsistent with the behaviour for hex floats, which only reach this
code if a full hex float has been parsed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original pattern "UXp>" with the $_ that causes the failure, 5,
so we end up packing exp(5) or 148.... with U packs:
- U (148), producing C2 94, with the UTF8 flag set
- X - back up a byte,
- p> - write the address of PL_sv_no's PV in big-ending
The final p> will typically overwrite the 94 with a zero on 64-bit
systems, but with the smaller address space of 32-bit systems that
high-byte is more likely to be a valid continuation byte, causing
the comparison to fail.
Instead just pack a zero byte.
|
|
|
|
|
|
|
|
|
| |
RT #131851
It was incorrectly optimising some permutations of comparison op and 0/-1
which shouldn't have been, such as
0 < index(...);
|
|
|
|
| |
fix typo from my recent commit. Spotted by Jarkko.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently I made it so that in expression like index(...) == -1, the
const and eq ops are optimised away and a BOOL flag is set on the index
op.
This commit expands this to various permutations of relational ops too,
such as
index(...) >= 0
index(...) < 0
index(...) <= -1
|
|
|
|
|
|
|
|
|
|
|
| |
A block of tests I added recently tests that (index(...) == -1) style
optimisations don't break things.
Each test was hard-coded. Instead, use some nested loops and eval
to test all the combinations.
This commit does just the same tests as before, but it will allow us to
easily add more tests without lots of duplication.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Where an op in scalar but not boolean context returns &PL_sv_zero as a
more efficient way of doing sv_2mortal(newSViv(0)), the returned value
must be mutable. For example
my @a = ();
my $r = \ scalar grep $_ == 1, @a;
$$r += 10;
By setting the SVs_PADTMP flag, this forces pp_srefgen() and similar to
make a mortal copy of &PL_sv_zero.
This kind of defeats the original optimisation, but the copy only kicks
in under certain circumstances, whereas the newSViv(0) approach would
create a new mortal every time.
See RT #78288 for where FC suggested the problem and the solution.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With v5.27.2-30-gdf6b4bd, I changed the way that PVLVs store a regexp
value (by making the xpv_len field point to a regexp struct). There was a
bug in this, which caused the PVX buffer to be double freed.
Several REGEXP SVs can share a PVX buffer. Only one of them will have a
non-zero xpv_len field, and that SV gets to free the buffer.
After the commit above, the non-zero xpv_len was triggering an extra free.
This was showing up in smokes as failures in re/recompile.t when invoked
with PERL_DESTRUCT_LEVEL=2 (which t/TEST does).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RT #131821
After my recent commit
v5.27.2-30-gdf6b4bd, "give REGEXP SVs the POK flag again",
$r = qr/.../; utf8::upgrade($$r);
was setting the utf8 flag on the compiled REGEXP SV, which made no sense,
as the regex was already compiled and individual nodes would remain
non-utf8.
The POK flag was removed from REGEXPs in 5.18.0, but before then it didn't
seem to matter if the utf8 flag got set later, but it does now - it broke
a Tk test.
|