| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
[DELTA]
1.19 Sat Dec 3 09:32:31 2016
- U::C::Locale newly supports locales: he, vo.
- locales updated to CLDR 24: az, haw.
- locale updated to CLDR 26: et.
|
|
|
|
|
|
|
|
|
|
| |
The pod/.gitignore file has sections of files that should be ignored.
Three of the files are in the wrong section, in the
architecture-specific section instead of the generated-files section.
This changes no functionality, but may help future maintainers from
confusion.
For: RT #130194
|
|
|
|
|
|
|
|
|
|
|
| |
GCC -Wcast-qual option reports a const violation in utf8_hop
functions. They take a pointer to constant data but returns pointer to
non-constant data.
It's impossible to fix this without changing their prototype.
Therefore this patch asks a compiler to ignore the violations.
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
|
|
|
|
|
| |
The original code was generated and then hand-tunes. Therefore
I edited the code in place instead of fixing the regen/regcharclass.pl
generator.
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building an XS code with -Wcast-qual yielded warnings about discarding
const qualifiers from pointer targets like:
$ printf '#include "EXTERN.h"\n#include "perl.h"\n' | gcc -Wcast-qual -I/usr/lib64/perl5/CORE -c -x c -
In file included from /usr/lib64/perl5/CORE/hv.h:629:0,
from /usr/lib64/perl5/CORE/perl.h:3740,
from <stdin>:2:
/usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_siphash_2_4’:
/usr/lib64/perl5/CORE/hv_func.h:213:17: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
U64TYPE k0 = ((U64TYPE*)seed)[0];
^
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This:
@a = split(/-/,"-");
$a[1] = undef;
$a[0] = 0;
was giving
Modification of a read-only value attempted at foo line 3.
This is because:
1) unused slots in AvARRAY between AvFILL and AvMAX should always be
null; av_clear(), av_extend() etc do this; while av_store(), if storing
to a slot N somewhere between AvFILL and AvMAX, doesn't bother to clear
between (AvFILL+1)..(N-1) on the assumption that everyone else plays
nicely.
2) pp_split() when splitting directly to an array, sometimes over-splits
and has to null out the excess elements;
3) Since perl 5.19.4, unused AV slots are now marked with NULL rather than
&PL_sv_undef;
4) pp_split was still using &PL_sv_undef;
The fault was with (4), and is easily fixed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Splint has not been updated since 2007 and doesn’t even build for me.
As far as I know, I'm the only person who's ever worked with Splint on
Perl 5.
Here's what changes:
* Makefile target "splint"
* Macros in XSUB.h and perl.h
* Support in regen/embed.pl
|
|
|
|
|
|
|
|
| |
Commit 535a3fb3ec9051c531a7797f1de40cbfc39e3f7f changed lib/locale.t to
not fail on locales that don't have NUL be a control. It did this by
skipping the failing test. However, I realized later that there is a
way to handle the situation without skipping a test, and that is to add
NUL to the list of controls if it isn't already there.
|
|
|
|
|
|
|
|
|
|
| |
* The struct TM * pointers to S_check_tm and S_timegm64 functions is
not modified, so make it be a const and let the compiler know it won't
get modified.
* Localize variables to their innermost scopes
* Consting various local variables
|
|
|
|
|
|
|
| |
This variable really means the character that replaces any embedded NULs
when doing collation. Change the name accordingly. (Embedded NULs must
be replaced because the libc function strxfrm is used, and it operates
on C strings which have no embedded NULs.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I thought this bug was in FREEBSD, but when I went to gather the info
needed to report it to the vendor, it turned out to be a mistake I had
made.
The problem is basically doubly encoding into UTF-8. In order to save
CPU time, in a UTF-8 locale, I had stored a string as UTF-8 encoded.
This string is to be inserted into a larger string. What I neglected to
consider in this situation is that not all strings in such locales need
be in UTF-8. The UTF-8 encoded insert could get added to a non-UTF-8
string, and the result later was switched to UTF-8, so the inserted
string's bytes were individually converted to UTF-8, effectively a
second time. This is a problem only if the inserted string is different
when encoded in UTF-8 than not, and for this particular usage, on most
platforms it was UTF-8 invariant, so did not show up, except on those
platforms where it was variant.
The solution is to store the replacement as a code point, and encode it
as UTF-8 only if necessary, once. This actually simplifies the code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A test that assumed NUL would be considered a control fails in locales
where it isn't considered a control.
This was found on FREEBSD, where the locale "hi_IN.ISCII-DEV" is
defective (based on the Wikipedia article on ISCII
https://en.wikipedia.org/wiki/Indian_Script_Code_for_Information_Interchange).
Only the code points 0x09-0x0D are considered controls in this
implementation, whereas the article says ISCII is a superset of ASCII,
so should have 33 controls, not just 5. (Unrelated to this ticket, but
another apparent defect I saw is that this implementation defines 0x91,
but the article says that code point is unassigned.)
|
|
|
|
|
| |
Perl works properly with only a subset of the possible locales out
there. This improves the detection of those and the skipping.
|
| |
|
| |
|
|
|
|
| |
importing Carp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RT #130188
In
sub f {
my $x = 'a';
$x =~ s/./return;/e;
}
the 'return' triggers popping any contexts above the subroutine context:
in this case, a CXt_SUBST context. In this case, Perl_dounwind() calls
cx_popblock() for the bottom-most popped context, to restore any saved
vars. However, CXt_SUBST is the one context type which *doesn't* use
'struct block' as part of its context struct union, so you can't
cx_popblock() a CXt_SUBST context.
This commit makes it skip the cx_popblock() in this case.
Bug was introduced by me with v5.23.7-235-gfc6e609.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was failing on EBCDIC machines, and I couldn't figure out why. I
didn't see any flaws in the logic. It required special debugging code
to answer. It turns out it was a bad declaration, and not logic at all.
The declaration should have been
const U8 prefix[] = ...
instead it was
const U8 * const prefix = ...
sizeof() the latter is 4, as it is looking at pointer size. What was
intended was the size of the array this was initialized to, which was
longer. What this led to was later in the routine, a comparison was
stopping too early.
|
|
|
|
|
|
| |
This indents the new block formed by the previous commit. However,
since the indentation is getting too much, it also changes the indents
for all the nested for loops to 2 spaces to allow room on the line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some UTF-8 sequences may have multiple malformations. Commit
2b5e7bc2e60b4c4b5d87aa66e066363d9dce7930 tried to make sure that all
possible ones are raised, instead of abandoning searching after one is
found. Since, I realized that there was yet another case of two
malformations that it returned only one or the other of.
An input buffer may be too short to fully express the code point it
purports to. This can be determined by the first byte of the UTF-8
sequence indicating a longer sequence is requred than the space
available. But also, that shortened sequence can have a premature
beginning of another character earlier than the shortness. This commit
causes these to be both raised, instead of the previous behavior of
noting just one.
|
|
|
|
|
|
|
|
|
| |
This removes kludgy code that was trying, given a partial
character, to determine if there enough bytes present to guarantee that
the whole character must belong to a class of characters or not. Now
the necessary length to make that determination has instead manually
been placed in a table, so it can be looked up. In doing so, I
corrected one length that was failing on EBCDIC.
|
|
|
|
|
| |
It turns out that this test has two malformations, and should only have
one; a future commit will remove the masking of the 2nd one.
|
| |
|
|
|
|
|
| |
This is so they don't interrupt reading the output when there are
errors.
|
|
|
|
|
| |
This warning was changed recently in the 5.25 series, and has not been
in a stable release.
|
| |
|
|
|
|
|
| |
There should be no warnings generated, but if there are, we want to see
what they were.
|
|
|
|
|
| |
The flag was added by v5.21.4-17-ga623f89, but outside of the commit
message itself, there didn't seem to be any explanation for this flag.
|
|
|
|
|
|
|
|
|
| |
g++ is too stupid to know that strtoul(..,&unparsed,...) will modify
unparsed. So initialise it to NULL.
POSIX.xs: In function ‘void XS_POSIX_strtoul(PerlInterpreter*, CV*)’:
POSIX.xs:3468:17: warning: ‘unparsed’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (unparsed)
|
|
|
|
|
|
|
| |
This function is equivalent to sv_setsv(sv, &PL_sv_undef), but more
efficient.
Also change the obvious places in the core to use the new idiom.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RT #130132
My recent commit v5.25.6-266-ga083329 made it so that perl could
sometimes avoid mortalising the referent when assigning to a reference
(e.g. for $ref1 = $ref2, where $$ref1 has a ref count of 1).
Unfortunately it turns out that list assign relied on this behaviour
to avoid premature freeing, e.g.
($ref1, $x) = ($y, $$ref1);
where $$ref1 needs to continue to live for at least the rest of the
assign.
This commit fixes it by mortalising the referent in pp_assign when
required.
|
| |
|
|
|
|
|
|
|
|
|
| |
In looking at the diffs from f6e4c377437f9b2ded79fb55f66983a6d4f761f9,
just committed, I realized that some of the functions marked pure,
really have side effects, if only initialization if not called
previously. Still, the compiler could optimize things so it is wrong.
I then did a manual audit of embed.fnc, and removed the pure attribute
of the functions that I found that have some potential side effects.
|
|
|
|
|
|
|
|
|
| |
embed.fnc defines that a pure function is one that has no effects other
than its return value. Therefore, calling such a function without using
the return value must be an error.
This patch makes a "P" "pure function" flag also imply the "R" "return
value must be checked" flag.
|
|
|
|
|
| |
These are currently zero anyway, but things are probably not guaranteed
to stay so.
|
|
|
|
|
|
|
|
|
| |
The test had several problems that resulted in the excess
bytes not getting zeroed out. This caused random contents in
$Config{longdblinfbytes}, observed on Debian with GCC 6.2.0 (but not
5.4.1).
Bug-Debian: https://bugs.debian.org/844752
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Following release manager doc
|
| |
|
| |
|
|
|
|
|
| |
This will still likeyl get minor changes in the rest of the release
process, but the pre-release editing is done.
|
|
|
|
|
| |
This commit satisfies 'podchecker pod/perldelta.pod', but there remain
problems detected during t/porting/podcheck.t.
|