| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Because we manually generate Makefiles, any executables need to be
generated from .PL files in utils/. This test checks if dual-life
executables show up in utils/.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after the recent commit 803f274831f937654d48f8cf0468521cbf8f5dff,
the CvGV field is sometimes reference counted. Since it was intended that
the reference counting would happen only for anonymous CVs, the CVf_ANON
flag was co-opted to indicate whether RC was being used. This is not
entirely robust; for example, sub __ANON__ {} is a non-anon sub which
points to the same GV used by anon subs, which while itself doesn't
directly break things, shows that the potential for breakage is there.
So add a separate flag just to indicate the reference count status of the
CvGV field.
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the new construct \o{} to express a character constant
by its octal ordinal value, along with ancillary tests and
documentation.
A function to handle this is added to util.c, and it is called from the
3 parsing places it could occur. The function is a candidate for
in-lining, though I doubt that it will ever be used frequently.
|
|
|
|
| |
Signed-off-by: David Golden <dagolden@cpan.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this patch, \400 - \777 meant something different in some
circumstances in regexes outside bracketed character classes. A
deprecated warning message has been in place since 5.10.1 when this
happens. Remove the warning, and bring the behavior into line with the
other double-quotish contexts. \400 - \777 now always means the same
thing as \x{100} - \x{1FF} (except when the octal forms are taken as
backreferences.)
Signed-off-by: David Golden <dagolden@cpan.org>
|
|
|
|
|
|
|
|
| |
My vim settings were causing extra blanks in this file; remove the ones
I added recently and set the vim options to disable the offending
feature.
Signed-off-by: David Golden <dagolden@cpan.org>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each CV usually has a pointer, CvGV(cv), back to the GV that corresponds
to the CV's name (or to *foo::__ANON__ for anon CVs). This pointer wasn't
reference counted, to avoid loops. This could leave it dangling if the GV
is deleted.
We fix this by:
For named subs, adding backref magic to the GV, so that when the GV is
freed, it can trigger processing the CV's CvGV field. This processing
consists of: if it looks like the freeing of the GV is about to trigger
freeing of the CV too, set it to NULL; otherwise make it point to
*foo::__ANON__ (and set CvAONON(cv)).
For anon subs, make CvGV a strong reference, i.e. increment the refcnt of
*foo::__ANON__. This doesn't cause a loop, since in this case the
__ANON__ glob doesn't point to the CV. This also avoids dangling pointers
if someone does an explicit 'delete $foo::{__ANON__}'.
Note that there was already some partial protection for CvGV with
commit f1c32fec87699aee2eeb638f44135f21217d2127. This worked by
anonymising any corresponding CV when freeing a stash or stash entry.
This had two drawbacks. First it didn't fix CVs that were anonmous or that
weren't currently pointed to by the GV (e.g. after local *foo), and
second, it caused *all* CVs to get anonymised during cleanup, even the
ones that would have been deleted shortly afterwards anyway. This commit
effectively removes that former commit, while reusing a bit of the
actual anonymising code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each CV usually has a pointer, CvSTASH, back to the stash that it was
complied in. This pointer isn't reference counted, to avoid loops. Which
can leave it dangling if the stash is deleted.
There is already protection for the similar GvSTASH field in GVs: the
stash has an array of backrefs, xhv_backreferences, pointing to the GVs
whose GvSTASHes point to it, and which is used to zero all the GvSTASH
fields should the stash be deleted.
All this patch does is also add the CVs with CvSTASH to that stash's
backref list too.
|
| |
|
| |
|
|
|
|
|
|
| |
Previously, if the scalar's character length wasn't yet known, but an offset
midway was, the offset would be ignored, and the linear scan of UTF-8 was for
the entire length of the scalar.
|
|
|
|
|
|
| |
Previously it would not take special action if the offset requested happened to
be the end of the string, meaning that the (fixed size) UTF-8 offset cache
would be used for a value which could (and should) be stored elsewhere.
|
|
|
|
|
|
| |
Change S_sv_pos_u2b_forwards() to take a point to the (requested) UTF-8 offset,
and return the actual UTF-8 offset for the byte position returned. This ensures
that the cache is consistent with reality.
|
|
|
|
|
| |
In fact, as t/harness requires t/TEST, simply get t/TEST to do it for
t/harness too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# New Ticket Created by karl williamson
# Please include the string: [perl #76398]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76398 >
See attached patches
>From 275169a8df5851331669da2dd791483379c3fc5e Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@khw-desktop.(none)>
Date: Tue, 6 Jul 2010 09:20:42 -0600
Subject: [PATCH] t/lib/common.pl: localize changing $/
$/ changes should not affect callers.
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
|
|
|
|
| |
Signed-off-by: David Golden <dagolden@cpan.org>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The default watchdog strategy on Win32 doesn't work because the watchdog
is executed via subshell ("cmd /c perl -e '...'"). When the test finishes
and tries to kill the watchdog all it manages to do is whack cmd.exe and
the watchdog still fires, potentially killing an innocent process.
* Trying to use the fork() strategy instead causes openpid.t's test #9's
"ok" to be lost occasionally. The message itself is generated by the 4th
child of the test and should go directly to stdout, but sometimes the
output vanishes for unexplained reasons. This doesn't appear to happen
without the watchdog enabled.
* Using the alarm() watchdog strategy seems to not cause any badness.
|
|
|
|
|
|
|
| |
Perl_lex_start() assumes that the SV passed to it is a well-behaved
string that it can do PVX() stuff to. If it's actually a ref to an
overloaded object, it can crash and burn. Fixed by creating a stringified
copy of the SV if necessary.
|
|
|
|
| |
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
|
|
|
|
|
|
|
| |
This avoids needing to use a variable in package main to pass in information.
Also, remove an unnecessary $ENV{PERL5LIB} assignment cargo-culted into most
users of t/lib/common,pl, and remove the BEGIN block as the code it contained
doesn't need to run at BEGIN time.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Previously it would only work if the comment was on the line immediately
preceding the closing /\);/, which was fine for croak()/die()/etc function
calls all on one line, but not so useful for longer calls.
|
|
|
|
|
|
|
|
| |
These had been present since 5.000, but were inadvertently removed by the
refactoring b8f04b1b779ce1df.
Yes, files matching /.*.h\z/ get two pieces of advice in the error message, but
this was the exact behaviour pre-b8f04b1b779ce1df.
|
|
|
|
|
|
| |
d8723a6a74b2c12e wasn't perfect, as the char * returned by SvPV*() can be
a temporary, freed at the next FREETMPS. There is a FREETMPS in pp_require,
so move the SvPV*() after it.
|
|
|
|
|
| |
Pattern replacements need to have the deprecation added; the prior patch
on this ticket only changed m/a/keyword; this adds the s/a/b/keyword
|
| |
|
|
|
|
|
|
| |
The code was checking flags with applying any get magic, so when a
match was doing putting a numeric string into $1, none of the flags
checked were set, so producing the "non-numeric process ID" error.
|
|
|
|
| |
Before this, if @_ had become AvREAL(), it retains reference on its elements.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that if a regex check string is determined to be "not useful"
it is permananently disabled. However, it appears that when doing this
we dont necessarily reset any flags that are related to it.
Worse, the behaviour is not determinisitic, so it is quite possible that
a given program may experience this bug "randomly" based on what strings
it was matching. Thus it may be difficult to reproduce.
Resetting the RXc_ANCH_MBOL when we know that it is implicit
(PREGf_IMPLICIT) seems to fix /this/ particular example. But it wouldn't
surprise me to discover that other "random" bugs we encounter can be
traced back to this behaviour.
This fixes RT #75878 which is derived from ActiveState Bug #87173.
http://bugs.activestate.com/show_bug.cgi?id=87173
http://rt.perl.org/rt3/Ticket/Display.html?id=75878
|
|
|
|
| |
Remove AvREAL from @_, and set AvALLOC when reallocating @_.
|
|
|
|
|
|
|
| |
This patch raises a deprecated warning on constructs like
$result = $a =~ m/$foo/sand $bar;
which means
$result = $a =~ m/$foo/s and $bar;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unicode contains two context-sensitive case-changing rules. This patch
enables one of them, dealing with the Greek YPOGEGRAMMENI. The code had
been #ifdef'd out, so the changes here are more than what the diff
shows. The reason it was #ifdef'd out was because more research was
needed to verify that it was correct, which I have now done, and think
it is.
The issue is we may just be uppercasing a portion of the context, so
don't have complete knowledge of what should be done. This patch causes
us to move the ypogegrammeni to as far right as it should go, or to the
end of the context we know about, whichever comes first. That's the
best we can do. If it really should be moved further to the right,
there's no way we can do it, because the user has not called uc()
with the full information needed. So, in all cases, this is better than
just leaving it where it was in the input. Also, the applicable context
is limited to a logical character, that matched by /\X/, so if the user
is calling uc() on a subset of a logical character, it really is their
mistake.
|
|
|
|
|
|
| |
Add an option to case.pl so that the callers can run extra tests that
don't fit in with it's format. They just pass the number run to it, and
it adjusts the plan accordingly.
|
|
|
|
| |
Plus a test that would fail if it did.
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 191ad7eff570fc96c93993e4358f83e2033365d6.
Some modules (e.g. File::chdir) relied on the current behaviour of
local $tied_scalar, so lets leave things as-is for now. See
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2010-05/msg00627.html
|
|
|
|
|
|
|
|
| |
In 5.6.2, a failure to find a CORE::GLOBAL::glob after loading
File::Glob would result in a fallback to external glob via pp_glob.
Now it crashes.
The attached patch should fix this.
|
| |
|
| |
|
|
|
|
|
|
| |
pp_entersub checked for ROK *before* calling magic. If the tied scalar
already had ROK set (perhaps from a previous time), then get magic (and
hence FETCH) wasn't called.
|
|
|
|
|
| |
It overflows at compile time on 32-bit architectures, so the skip
isn't enough.
|