| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #19205
|
|
|
|
| |
We no longer support Visual C++ 2012 and older.
|
|
|
|
|
|
|
| |
This reverts commit 632ce96a35d784df9e43bc8ad87b4e8f1f24a590.
Sereal hasn't been fixed yet to deal with the fallout of this change,
so we postpone this change for a later moment
|
| |
|
|
|
|
|
|
|
| |
share_hek_hek() manipulates the shared HEK's reference count directly,
without needing to find it in the shared string table. It was added after
Perl_newHVhv() was implemented, and no-one noticed that it could be used
there.
|
|
|
|
|
| |
Defining this macro causes newHV() to create hashes without shared hash key
scalars. The default is that hashes are created with shared hash keys.
|
|
|
|
|
|
|
|
| |
It created a hash built with non-shared keys, but left the "shared keys"
flag set on the hash.
This hasn't been spotted in 20 years, which shows just how much we use
hashes with unshared keys.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hv_delete_common() must update isa magic stash records when *ISA is deleted
(see commit 6146d9e1c87d449f)
However, it's only valid to use the macro GvAV() on an SV that is a GV.
Previously the code was not checking this, hence if someone deliberately
manipulated the symbol table to first store something other than a typeglob,
and then delete that entry from the symbol table, then (at best) an
assertion would fail, at worst illegal memory accesses.
Do this by moving the check for `SvTYPE(sv) == SVt_PVGV` up to the if() that
governs both code blocks.
Note that you could only trigger this bug by running code that manipulates
symbol tables directly. Compilation of Perl code would not hit it, nor could
user-controlled data in executing Perl programs, unless the programs both
contain code to manipulate symbol tables, and permit unvalidated user data
to reach those code paths.
(Such programs are likely insecure already, as their control flow can be
subverted by user controlled data without requiring any interpreter bugs.)
|
|
|
|
|
| |
PADOFFSET is SSize_t, so %lu is wrong even if long and SSize_t are the
same size.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also remove the Platform SDK 2003 SP1/R2 64-bit compiler since (having just
tried it) it no longer builds perl because it doesn't allow mixed code and
declarations.
Also remove mention of the Windows SDK since it doesn't appear to contain
the compiler or linker any more. This page says that the VC++ 2010 compiler
and linker were included in the Windows 7 SDK but then makes no mention of
it for the Windows 8 SDK:
https://docs.microsoft.com/en-us/previous-versions/visualstudio/windows-sdk/ff660763(v=vs.110)
The page notes that it is no longer being updated, but the whole of the
C:\Program Files (x86)\Windows Kits folder on my system (which contains
8.0, 8.10 and 10) does not contain any cl.exe or link.exe.
I've re-worded some of the if/else conditions in the makefiles to pick out
earlier versions rather than later versions. Thus, the current versions
become the "else" case, which means that the next version of Visual C++ is
more likely to work without requiring any changes.
|
|
|
|
| |
CID 340472
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No-one had thought to test for this explicitly. After all, both
`for my $foo ...` and `for my$foo ...` are valid syntax, so tweaking the
C lexer code to add an optional '(' should work, surely?
The problem was that, *as was*, the lexer code didn't "accept" those two
syntax variants the way the comments would suggest.
`for my $foo ...` was treated as
1) we saw 'my '
2) we saw the dollar sign
3) success!
but `for my$foo ...` was treated as
0) we didn't see 'my ' or 'our '
1) we saw the literal string 'my' which is valid as a package name
2) we saw the dollar sign
3) success!
ie some sort of mangled variant of `for my Dog $spot ...` without 'my'
*but* as the lexer was happy with what it saw, it returned that the input
stream was valid for a "for" token, and control continues to the grammar.
The grammar, of course, didn't make these mistakes, so parsed everything
properly and built the correct optree.
(And, if presented with `for Dog $spot (...)` the grammar wouldn't match,
so all invalid code was correctly rejected)
However, all this came unstuck with `for my($k` because that didn't
mis-tokenise as some crazy package name 'my(', so it reported a syntax error.
Hence rewrite yyl_foreach() to actually tokenise everything correctly.
"Correctly", to be clear, is bug-for-bug compatible with the current emergent
behaviour for various corner cases for "parses and runs" vs "syntax error".
We don't always report identical error messages for certain syntax errors,
where the precise message reported was itself emergent behaviour from the
bugs in the previous implementation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had tests for CORE::state, but not CORE::my or CORE::our. It happens that
they are all legal syntax, but seemingly more be accident than design. They
are only accepted by yyl_foreach() as a quirk of the current implementation.
Note that for my Dog $spot (...) {} is legal, but not CORE::my. our Dog is
legal, CORE::our is not. Neither state Dog nor CORE::state are legal. These
are all emergent behaviour of the parser - do not take these tests as
"correct", merely as verifying that current behaviour doesn't change unless
we intended it to.
|
| |
|
|
|
|
|
|
| |
* cpan/Memoize/t/errors.t: Use GDBM_NEWDB as the flags argument
when tying to GDBM_File.
* cpan/Memoize/t/tie_gdbm.t: Likewise.
|
| |
|
|
|
|
| |
This ensures that DB_File and GDBM_File will be built and tested.
|
|
|
|
|
|
| |
It randomly fails with a fatal error for no apparent reason.
Fixes #19189
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
Multiple commas between the lexicals in the list shouldn't change the
parsing.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move some other variable declarations into a tighter scope, and initialise
variables at the point of declaration where possible.
With the recent changes, the function consists of a 4-way switch inside a
loop, where each iteration of the loop will take the same case in the
switch. This implies a branch taken on each iteration of the loop, which
is less efficient than the alternative structure of taking the branch once
and then looping.
However, the way the code is structured (particularly how two of the cases
share code, by jumping sideways), means that rewriting it to "switch first"
structure would not be clearer (and likely would also be hard to get
right). Hence it seems better to let a compiler optimiser choose what is
best. However, it might not realise that CxTYPE(cx) won't be changed, even
as a side effect of any function called by this code. Hence hoist it into a
constant variable to make this unequivocal.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For example, this now works:
for my ($key, $value) (%hash) { ... }
Only for scalars declared with my as a list in the for loop statement.
As many as you want (unless you want more than 4294967296).
|
| |
| |
| |
| |
| |
| | |
Perl_newFOROP can now also take an OP_LIST corresponding to two or more
lexicals to iterate over n-at-a-time, where those lexicals are all
declared in the for statement, and occupy consecutive pad slots.
|
| |
| |
| |
| |
| | |
This commit provides the runtime changes needed to iterate for loops over
two or more variables.
|
| |
| |
| |
| |
| |
| |
| | |
Add braces and indent a block that will become a `for` loop in the next
commit. With the exception of these and merging 3 opening braces onto the
`if` or `else` on the previous lines, this commit is purely a whitespace
change.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ext/GDBM_File/Makefile.PL: Register new constants: gdbm_open
flags and return values for gdbm_latest_snapshot.
* ext/GDBM_File/GDBM_File.pm: Update documentation.
Export new constants.
Raise version to 1.21.
* ext/GDBM_File/GDBM_File.xs (dbcroak): Include system error
infomation, when appropriate.
(gdbm_syserrno): Return a meaningful value if not_here.
(gdbm_dump, gdbm_load, gdbm_convert)
(gdbm_failure_atomic, gdbm_latest_snapshot)
(gdbm_crash_tolerance_status): New functions.
* ext/GDBM_File/t/dump.t: New testcase.
* ext/GDBM_File/t/snapshot.t: New testcase.
* MANIFEST: List new files.
|
|\
| |
| |
| |
| | |
For p.r. https://github.com/Perl/perl5/pull/19181; last of 3 pull
requests for https://github.com/Perl/perl5/issues/19183
|
|/
|
|
|
| |
Do not advise sending mail to 'perlbug@perl.org', as that now simply
triggers a response redirecting sender to GitHub.
|
| |
|
|
|
|
|
| |
And the implications for XS authors writing code to work on both current and
earlier perl installations.
|
| |
|