This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
9 years agot/op/inc.t: Generalize for EBCDIC
Karl Williamson [Sun, 26 Oct 2014 03:27:54 +0000 (21:27 -0600)]
t/op/inc.t: Generalize for EBCDIC

9 years agot/op/ver.t: Generalize for EBCDIC
Karl Williamson [Sun, 26 Oct 2014 03:27:20 +0000 (21:27 -0600)]
t/op/ver.t: Generalize for EBCDIC

9 years agot/lib/warnings/regcomp: SKIP some EBCDIC tests
Karl Williamson [Sun, 26 Oct 2014 03:26:20 +0000 (21:26 -0600)]
t/lib/warnings/regcomp: SKIP some EBCDIC tests

The result varies depending on EBCDIC code page

9 years agolib/overload.t: Generalize for EBCDIC
Karl Williamson [Wed, 14 Jan 2015 19:42:41 +0000 (12:42 -0700)]
lib/overload.t: Generalize for EBCDIC

9 years agoPerlIO-encoding/t/encoding.t: Generalize for non-ASCII platform
Karl Williamson [Wed, 22 Oct 2014 16:17:40 +0000 (10:17 -0600)]
PerlIO-encoding/t/encoding.t: Generalize for non-ASCII platform

9 years agot/lib/warnings/op: Skip some tests on EBCDIC
Karl Williamson [Wed, 22 Oct 2014 00:55:27 +0000 (18:55 -0600)]
t/lib/warnings/op: Skip some tests on EBCDIC

This splits a longer test into two smaller, the first is skipped on
EBCDIC because its result varies depending on code page.

9 years agot/lib/warnings/toke: Skip some tests on EBCDIC
Karl Williamson [Fri, 17 Oct 2014 03:16:24 +0000 (21:16 -0600)]
t/lib/warnings/toke: Skip some tests on EBCDIC

The results depends on the particular EBCDIC platform being used, so I
don't think it is worth the effort.

9 years agoPOSIX/t/export.t: Generalize for non-ASCII platforms
Karl Williamson [Fri, 17 Oct 2014 03:07:11 +0000 (21:07 -0600)]
POSIX/t/export.t: Generalize for non-ASCII platforms

9 years agoPod-Functions/Functions_pm.PL: Generalize for non-ASCII platforms
Karl Williamson [Fri, 17 Oct 2014 03:03:50 +0000 (21:03 -0600)]
Pod-Functions/Functions_pm.PL: Generalize for non-ASCII platforms

9 years agoHash-Util tests: Generalize for non-ASCII platforms
Karl Williamson [Fri, 17 Oct 2014 03:00:56 +0000 (21:00 -0600)]
Hash-Util tests: Generalize for non-ASCII platforms

9 years agot/op/override.t: Generalize for non-ASCII platforms
Karl Williamson [Fri, 17 Oct 2014 02:50:29 +0000 (20:50 -0600)]
t/op/override.t: Generalize for non-ASCII platforms

9 years agot/op/chars.t: Generalize to not use code page specific
Karl Williamson [Mon, 12 May 2014 01:34:08 +0000 (19:34 -0600)]
t/op/chars.t: Generalize to not use code page specific

In EBCDIC, \c? resolves to the APC character.  We can use table lookup
to find out what that is on the current platform, without having to know
what code page we are using.

9 years agoregexp_unicode_prop.t: Generalize for non-ASCII platforms
Karl Williamson [Thu, 27 Jun 2013 00:23:27 +0000 (18:23 -0600)]
regexp_unicode_prop.t: Generalize for non-ASCII platforms

9 years agot/lib/feature/implicit: Generalize for EBCDIC platforms
Karl Williamson [Wed, 26 Jun 2013 21:25:37 +0000 (15:25 -0600)]
t/lib/feature/implicit: Generalize for EBCDIC platforms

9 years agoext/XS-APItest/t/hash.t: Generalize to run on non-ASCII platforms
Karl Williamson [Tue, 21 May 2013 04:01:02 +0000 (22:01 -0600)]
ext/XS-APItest/t/hash.t: Generalize to run on non-ASCII platforms

9 years agot/lib/feature/implicit: Generalize for non-ASCII platforms
Karl Williamson [Tue, 21 May 2013 03:54:01 +0000 (21:54 -0600)]
t/lib/feature/implicit: Generalize for non-ASCII platforms

9 years agot/op/coreamp.t: Generalize for non-ASCII platfomrs
Karl Williamson [Fri, 19 Apr 2013 19:58:12 +0000 (13:58 -0600)]
t/op/coreamp.t: Generalize for non-ASCII platfomrs

9 years agot/re/re_tests: Some tests are platform-specific
Karl Williamson [Thu, 18 Apr 2013 03:49:10 +0000 (21:49 -0600)]
t/re/re_tests: Some tests are platform-specific

9 years agot/io/crlf.t: Generalize for non-ASCII platforms
Karl Williamson [Wed, 17 Apr 2013 14:22:36 +0000 (08:22 -0600)]
t/io/crlf.t: Generalize for non-ASCII platforms

9 years agoext/B/t/b.t: Generalize for non-ASCII platforms
Karl Williamson [Tue, 16 Apr 2013 18:13:07 +0000 (12:13 -0600)]
ext/B/t/b.t: Generalize for non-ASCII platforms

9 years agot/op/warn.t: Generalize for non-ASCII platforms
Karl Williamson [Tue, 16 Apr 2013 17:50:04 +0000 (11:50 -0600)]
t/op/warn.t: Generalize for non-ASCII platforms

9 years agore/reg_email.t: Generalize for non-ASCII platforms
Karl Williamson [Tue, 16 Apr 2013 16:18:02 +0000 (10:18 -0600)]
re/reg_email.t: Generalize for non-ASCII platforms

This replaces all the hard-coded hex character values.  It uses the new
(?[ ]) notation.  I checked that the compiled regex matches the exact
same code points as before these changes.

9 years agoext/XS-APItest/t/svpeek.t: Extend to EBCDIC platforms
Karl Williamson [Sat, 13 Apr 2013 22:19:20 +0000 (16:19 -0600)]
ext/XS-APItest/t/svpeek.t: Extend to EBCDIC platforms

9 years agoext/XS-APItest/t/svpv_magic.t: Generalize for non-ASCII platforms
Karl Williamson [Sat, 13 Apr 2013 22:14:35 +0000 (16:14 -0600)]
ext/XS-APItest/t/svpv_magic.t: Generalize for non-ASCII platforms

9 years agolib/utf8.t: Generalize for non-ASCII platforms
Karl Williamson [Sat, 13 Apr 2013 21:35:52 +0000 (15:35 -0600)]
lib/utf8.t: Generalize for non-ASCII platforms

This includes choosing a different code point that has 3 bytes in both
UTF-8 and UTF-EBCDIC, so that the pos numbers work for both.

9 years agot/uni/parser.t: Extend to EBCDIC platforms
Karl Williamson [Sat, 13 Apr 2013 21:16:44 +0000 (15:16 -0600)]
t/uni/parser.t: Extend to EBCDIC platforms

9 years agot/uni/method.t: Extend to EBCDIC platforms
Karl Williamson [Sat, 13 Apr 2013 20:41:46 +0000 (14:41 -0600)]
t/uni/method.t: Extend to EBCDIC platforms

I couldn't figure out a way to not use the hard-coded values

9 years agot/op/magic.t: Generalize for non-ASCII platforms
Karl Williamson [Sat, 13 Apr 2013 20:26:09 +0000 (14:26 -0600)]
t/op/magic.t: Generalize for non-ASCII platforms

9 years agot/io/through.t: Generalize for EBCDIC platforms
Karl Williamson [Sat, 13 Apr 2013 19:36:41 +0000 (13:36 -0600)]
t/io/through.t: Generalize for EBCDIC platforms

This uses hard-coded values for EBCDIC because of the shell issues

9 years agot/op/goto.t: Generalize for non-ASCII platforms
Karl Williamson [Sun, 7 Apr 2013 16:45:14 +0000 (10:45 -0600)]
t/op/goto.t: Generalize for non-ASCII platforms

9 years agot/re/pat.t: Generalize for EBCDIC
Karl Williamson [Thu, 4 Apr 2013 02:15:17 +0000 (20:15 -0600)]
t/re/pat.t: Generalize for EBCDIC

9 years agot/uni/overload.t: Generalize for non-ASCII platforms
Karl Williamson [Sat, 6 Apr 2013 05:34:50 +0000 (23:34 -0600)]
t/uni/overload.t: Generalize for non-ASCII platforms

9 years agot/uni/method.t: Generalize for non-ASCII platforms
Karl Williamson [Sat, 6 Apr 2013 05:34:13 +0000 (23:34 -0600)]
t/uni/method.t: Generalize for non-ASCII platforms

9 years agot/op/utf8magic.t: Generalize for non-ASCII platforms
Karl Williamson [Sat, 6 Apr 2013 05:33:28 +0000 (23:33 -0600)]
t/op/utf8magic.t: Generalize for non-ASCII platforms

9 years agot/op/evalbytes.t: Generalize for non-ASCII platforms
Karl Williamson [Sat, 6 Apr 2013 05:32:57 +0000 (23:32 -0600)]
t/op/evalbytes.t: Generalize for non-ASCII platforms

9 years agot/op/utfhash.t: Fix to work on EBCDIC 1047
Karl Williamson [Sat, 6 Apr 2013 19:01:54 +0000 (13:01 -0600)]
t/op/utfhash.t: Fix to work on EBCDIC 1047

This .t thought it could have an __END__ in the middle of DATA input,
and the first read would read in up to that, and the second would read
the rest.  In bisecting, I couldn't find a time when this ever worked.
Now this has a marker, and does a split on that marker, choosing the
first or second half depending.

Note that this only works on ASCII and EBCDIC 1047 platforms.  It could
be extended for the other code pages Perl purportedly supports.

9 years agot/re/pat_re_eval.t: Generalize for non-ASCII platforms
Karl Williamson [Tue, 2 Apr 2013 04:29:16 +0000 (22:29 -0600)]
t/re/pat_re_eval.t: Generalize for non-ASCII platforms

9 years agot/op/split.t: EBCDIC fixes
Karl Williamson [Tue, 2 Apr 2013 03:08:20 +0000 (21:08 -0600)]
t/op/split.t: EBCDIC fixes

9 years agore/pat_advanced.t: EBCDIC fixes
Karl Williamson [Tue, 2 Apr 2013 02:43:03 +0000 (20:43 -0600)]
re/pat_advanced.t: EBCDIC fixes

This includes not skipping some EBCDIC that formerly was, since we now
have testing infrastructure that makes this easy.

9 years agot/io/utf8.t: EBCDIC fixes
Karl Williamson [Tue, 2 Apr 2013 02:01:04 +0000 (20:01 -0600)]
t/io/utf8.t: EBCDIC fixes

9 years agot/uni/fold.t: Generalize for non-ASCII platforms
Karl Williamson [Sat, 30 Mar 2013 18:32:09 +0000 (12:32 -0600)]
t/uni/fold.t: Generalize for non-ASCII platforms

9 years agolib/feature/bundle: Generalize for non-ASCII platforms
Karl Williamson [Wed, 27 Mar 2013 22:55:55 +0000 (16:55 -0600)]
lib/feature/bundle: Generalize for non-ASCII platforms

9 years agoXS-APItest/t/fetch_pad_names.t: Skip if EBCDIC
Karl Williamson [Wed, 27 Mar 2013 22:08:04 +0000 (16:08 -0600)]
XS-APItest/t/fetch_pad_names.t: Skip if EBCDIC

This could be ported, but there's a lot of stuff to convert

9 years agoext/XS-APItest/t/utf8.t: Fix so passes EBCDIC
Karl Williamson [Wed, 27 Mar 2013 18:05:53 +0000 (12:05 -0600)]
ext/XS-APItest/t/utf8.t: Fix so passes EBCDIC

This involves skipping much of the tests, because it would be painful to
generalize for the different EBCDIC code pages.

9 years agoext/re/t/re_funcs_u.t: Generalize for non-ASCII platforms
Karl Williamson [Wed, 27 Mar 2013 17:27:06 +0000 (11:27 -0600)]
ext/re/t/re_funcs_u.t: Generalize for non-ASCII platforms

9 years agot/op/print.t: Skip an EBCDIC test
Karl Williamson [Wed, 27 Mar 2013 16:33:44 +0000 (10:33 -0600)]
t/op/print.t: Skip an EBCDIC test

This could be fixed (the values would probably change depending on the
code page), but the code that would get exercised is unlikely to vary
depending on character set.

9 years agoop/chop.t: Fix for EBCDIC
Karl Williamson [Tue, 26 Mar 2013 02:43:38 +0000 (20:43 -0600)]
op/chop.t: Fix for EBCDIC

One test is skipped because the code point is not representable on
EBCDIC platforms.  Other tests are modified to work on EBCDIC.

9 years agot/op/lc.t: Generalize for non-ASCII platforms
Karl Williamson [Tue, 26 Mar 2013 01:56:50 +0000 (19:56 -0600)]
t/op/lc.t: Generalize for non-ASCII platforms

This had code that attempted this, but it was wrong.  The conversion to
EBCDIC must be done before the \U, or similar.

9 years agoSkip some porting tests under EBCDIC
Karl Williamson [Mon, 25 Mar 2013 21:04:14 +0000 (15:04 -0600)]
Skip some porting tests under EBCDIC

EBCDIC won't work on these because of inherent differences from ASCII,
including a different sort order.

For porting/regen.t, we use the shipped parsing rules on EBCDIC platforms

9 years agot/re/regex_sets.t: Generalize for non-ASCII platforms
Karl Williamson [Mon, 25 Mar 2013 20:59:50 +0000 (14:59 -0600)]
t/re/regex_sets.t: Generalize for non-ASCII platforms

9 years agot/op/quotemeta.t: EBCDIC fixes
Karl Williamson [Tue, 19 Mar 2013 21:27:31 +0000 (15:27 -0600)]
t/op/quotemeta.t: EBCDIC fixes

9 years agot/re/fold_grind.t: Generalize for non-ASCII platforms
Karl Williamson [Tue, 19 Mar 2013 17:32:55 +0000 (11:32 -0600)]
t/re/fold_grind.t: Generalize for non-ASCII platforms

9 years agot/uni/class.t: Generalize to work on non-ASCII platforms
Karl Williamson [Tue, 19 Mar 2013 17:20:24 +0000 (11:20 -0600)]
t/uni/class.t: Generalize to work on non-ASCII platforms

9 years agofeature/unicode_strings.t: Generalize to work on non-ASCII platforms
Karl Williamson [Tue, 19 Mar 2013 17:01:57 +0000 (11:01 -0600)]
feature/unicode_strings.t: Generalize to work on non-ASCII platforms

9 years agolib/dumpvar.pl: Generalize for non-ASCII platforms
Karl Williamson [Sun, 2 Nov 2014 03:10:48 +0000 (21:10 -0600)]
lib/dumpvar.pl: Generalize for non-ASCII platforms

9 years agore/charset.t: Generalize for non-ASCII platforms
Karl Williamson [Fri, 15 Mar 2013 17:57:24 +0000 (11:57 -0600)]
re/charset.t: Generalize for non-ASCII platforms

This converts the hard-coded character numbers to native, so will work
on any platform.  It also adds some tests, and improves some test names

9 years agoAPItest/t/handy.t: Generalize for non-ASCII platforms
Karl Williamson [Wed, 13 Mar 2013 22:17:39 +0000 (16:17 -0600)]
APItest/t/handy.t: Generalize for non-ASCII platforms

9 years agot/base/lex.t: Generalize for EBCDIC platforms
Karl Williamson [Mon, 11 Mar 2013 04:17:31 +0000 (22:17 -0600)]
t/base/lex.t: Generalize for EBCDIC platforms

\xE2 is 'S' in EBCDIC, and so is ASCII there.  We need something that is
an alpha on both platforms that isn't ASCII.  \xDF works.

Also, 65 may not be "A" on a non-ASCII platform, so use 65 instead of
'A' where 65 is wanted

9 years agolib/Unicode/UCD.t: White-space only
Karl Williamson [Wed, 26 Jun 2013 22:06:47 +0000 (16:06 -0600)]
lib/Unicode/UCD.t: White-space only

Properly indent within a block

9 years agoperldelta for previous commit (threads upgrade)
Steve Hay [Thu, 5 Mar 2015 23:00:35 +0000 (23:00 +0000)]
perldelta for previous commit (threads upgrade)

9 years agoUpgrade to threads 1.98
Jerry D. Hedden [Thu, 5 Mar 2015 05:28:51 +0000 (00:28 -0500)]
Upgrade to threads 1.98

9 years agolib/Config.t: Skip tests that are invalid on os390
Karl Williamson [Fri, 21 Nov 2014 16:22:53 +0000 (09:22 -0700)]
lib/Config.t: Skip tests that are invalid on os390

9 years agot/comp/require.t: No longer needed to skip on EBCDIC
Karl Williamson [Wed, 29 Oct 2014 16:08:46 +0000 (10:08 -0600)]
t/comp/require.t: No longer needed to skip on EBCDIC

9 years agot/uni/write.t: Don't skip EBCDIC tests
Karl Williamson [Mon, 9 Jun 2014 18:30:23 +0000 (12:30 -0600)]
t/uni/write.t: Don't skip EBCDIC tests

This now passes on os390

9 years agot/lib/warnings/utf8: Update skip message
Karl Williamson [Wed, 26 Jun 2013 21:28:41 +0000 (15:28 -0600)]
t/lib/warnings/utf8: Update skip message

It is not that EBCDIC platforms don't check for malformedness; it is
that a different message gets generated on them, and it's too much
bother to figure it out for each such platform.

9 years agot/test.pl: EBCDIC, utf8 fixes
Karl Williamson [Mon, 2 Mar 2015 22:03:08 +0000 (15:03 -0700)]
t/test.pl: EBCDIC, utf8 fixes

This changes the display of all low-ordinal EBCDIC controls to octal,
instead of just the ones that correspond to the ASCII C0 controls.

It also makes sure that [:print:] thinks all non-ASCII are
non-printable.

9 years agolib/Unicode/UCD.t: Fixes to work on EBCDIC
Karl Williamson [Mon, 2 Mar 2015 22:00:25 +0000 (15:00 -0700)]
lib/Unicode/UCD.t: Fixes to work on EBCDIC

These were broken by the upgrade of Unicode::UCD to version 0.61

9 years agolib/open.t: Fix skip count
Karl Williamson [Thu, 5 Mar 2015 19:08:48 +0000 (12:08 -0700)]
lib/open.t: Fix skip count

9 years agoData::Dumper/t/dumper.t: Fix comments
Karl Williamson [Thu, 5 Mar 2015 17:34:08 +0000 (10:34 -0700)]
Data::Dumper/t/dumper.t: Fix comments

9 years agoreadline should behave as <>, not <<>>
Rafael Garcia-Suarez [Thu, 5 Mar 2015 16:37:33 +0000 (17:37 +0100)]
readline should behave as <>, not <<>>

This fixes bug #123990. The cause was that one promotion to
OP_READLINE was not cleaning the special flag on that op.

9 years agosprinkle NOTREACHED and FALLTHROUGH
David Mitchell [Thu, 5 Mar 2015 11:44:37 +0000 (11:44 +0000)]
sprinkle NOTREACHED and FALLTHROUGH

Coverity complains bitterly about many switch statements in lots of files.

Many of these are of the form:

    case FOO:
        ...
        goto baz;
    case BAR:
        ....

and something as smart as Coverity shouldn't really be complaining about
a missing 'break' when the last statement of the previous branch is an
unconditional goto/return/continue. But I've shoved in a bunch of
'NOTREACHED' to hopefully shut it up.

Missing 'FALLTHROUGH' comments were more reasonable, and I've added them
where appropriate.

The only confusing one was cx_dup(), where the various CXt_LOOP_ branches
all fell through to the next one, and it took a while to figure out that
those weren't bugs.

9 years agopp.c: remove unneeded SPAGAIN's
David Mitchell [Thu, 5 Mar 2015 11:01:01 +0000 (11:01 +0000)]
pp.c: remove unneeded SPAGAIN's

Spotted by Coverity.

I've left the SPAGAIN but commented out, in case future changes
to the code make them needed again.

9 years agodocument why S_maybe_multideref is Coverity-safe
David Mitchell [Thu, 5 Mar 2015 10:28:28 +0000 (10:28 +0000)]
document why S_maybe_multideref is Coverity-safe

9 years agofollowup for MEM_WRAP_CHECK
David Mitchell [Wed, 4 Mar 2015 14:49:22 +0000 (14:49 +0000)]
followup for MEM_WRAP_CHECK

On my previous commit, I failed to save the edited handy.h file where
I had edited the comments, so they were missed from the commit.

9 years agofurther tweak MEM_WRAP_CHECK()
David Mitchell [Wed, 4 Mar 2015 14:22:27 +0000 (14:22 +0000)]
further tweak MEM_WRAP_CHECK()

My recent mods to make it often constant-fold at time-time were
generating Coverity warnings when the expression happened to equal
(cond ? 1 : 1).

9 years agoConsistently use NOT_REACHED; /* NOTREACHED */
Jarkko Hietaniemi [Wed, 4 Mar 2015 12:37:33 +0000 (07:37 -0500)]
Consistently use NOT_REACHED; /* NOTREACHED */

Both needed: the macro is for compilers, the comment for static checkers.

(This doesn't address whether each spot is correct and necessary.)

9 years agoUpgrade Text-Balanced from version 2.02 to 2.03
Steve Hay [Wed, 4 Mar 2015 08:43:41 +0000 (08:43 +0000)]
Upgrade Text-Balanced from version 2.02 to 2.03

This incorporates the blead customizations, with no other changes except
the version bump.

9 years agothreads is no longer customized, as of commit c0ff91434b
Steve Hay [Wed, 4 Mar 2015 08:39:17 +0000 (08:39 +0000)]
threads is no longer customized, as of commit c0ff91434b

9 years agothreads is no longer customized, as of commit c0ff91434b
Steve Hay [Wed, 4 Mar 2015 08:14:20 +0000 (08:14 +0000)]
threads is no longer customized, as of commit c0ff91434b

9 years agoUpgrade to threads 1.97
Jerry D. Hedden [Tue, 3 Mar 2015 23:30:54 +0000 (18:30 -0500)]
Upgrade to threads 1.97

Committer actions: (1) regen for t/porting/customized.dat.
(2) perldelta for update to threads.

9 years agoIRIX: floating point: do not flush to zero
Jarkko Hietaniemi [Wed, 4 Mar 2015 00:15:25 +0000 (19:15 -0500)]
IRIX: floating point: do not flush to zero

Fix for [perl #123767] IRIX64 blead (ddce084a) opbasic/arith.t failure

Use the PERL_SYS_FPU_INIT to initialize the FPU flags appropriately.

9 years agoMake MEM_WRAP_CHECK more compile-time
David Mitchell [Thu, 26 Feb 2015 18:42:16 +0000 (18:42 +0000)]
Make MEM_WRAP_CHECK more compile-time

MEM_WRAP_CHECK(n,t) checks whether n * sizeof(t) exceeds the
memory size, and so is likely to wrap.

When the type of n is small (e.g. a U8), you used to get compiler warnings
about a comparison always being true. This was avoided by adding 0.0. Now
Coverity complains that you're doing a floating-point comparison with the
results of an integer division.

Instead of adding 0.0, instead add some more compile-time checks
that will cause the runtime check to be skipped when the maximum value
of n (as determined by sizeof(n)) is a lot less than memory size.

On my 64-bit system this also pleasingly makes the executable 8384 bytes
smaller, implying that in many cases, the run-time check is now being
skipped.

9 years agoTru64: living dangerously, enabling the -c99 flag for cc
Jarkko Hietaniemi [Tue, 3 Mar 2015 01:46:53 +0000 (20:46 -0500)]
Tru64: living dangerously, enabling the -c99 flag for cc

16 years after C99 and 2 years after Tru64 EOL.

9 years agoRemove unused variable $DEBUGGING.
James E Keenan [Thu, 26 Feb 2015 14:02:19 +0000 (09:02 -0500)]
Remove unused variable $DEBUGGING.

It is unused and there do not appear to be any tests to be run for -DDEBUGGING
in this file.

9 years agoBump Locale-Codes from 3.33 to 3.34
Sullivan Beck [Mon, 2 Mar 2015 23:37:20 +0000 (18:37 -0500)]
Bump Locale-Codes from 3.33 to 3.34

The core modules Locale::Country, Locale::Language, and Locale::Currency (all
part of the Locale-Codes distribution) should be updated on a regular basis.
They contain "codes" from various Internet standards which change over time.

9 years agoregen uconfig.h
David Mitchell [Mon, 2 Mar 2015 15:50:09 +0000 (15:50 +0000)]
regen uconfig.h

Needed after 0cd93aca4e274765.

9 years agoConfigure: add note about nvsize sometimes lying
Jarkko Hietaniemi [Mon, 2 Mar 2015 12:00:33 +0000 (07:00 -0500)]
Configure: add note about nvsize sometimes lying

Lying in case you expect that many bytes being used for NV.

9 years ago[perl #123960] sv.c: Fix gp_free -Do output
Father Chrysostomos [Mon, 2 Mar 2015 06:42:04 +0000 (22:42 -0800)]
[perl #123960] sv.c: Fix gp_free -Do output

We try to print ‘gp_free clearing PL_stashcache for '%"HEKf"'’, but
without checking that we actually have a hek.  This has been this way
since 103f5a36127.

9 years agoperldelta for b6bba8869651
Tony Cook [Mon, 2 Mar 2015 06:10:15 +0000 (17:10 +1100)]
perldelta for b6bba8869651

9 years ago[perl #123947] deparse $#_ as $#_ not as $#{_}
Tony Cook [Mon, 2 Mar 2015 06:03:12 +0000 (17:03 +1100)]
[perl #123947] deparse $#_ as $#_ not as $#{_}

8c2e27d changed B::Deparse to deparse $#{1} as that instead of as $#1
which is a syntax error, but also changed $#_ to deparse as $#{_}
which isn't necessary, and broke GFUJI/macro-0.06.tar.gz

This could be considered a bug in macro.pm, but since we don't need to
deparse $#_ as $#{_} let's not do that.

9 years ago[perl #123849] sv.c: Fix sv_clear -Do output
Father Chrysostomos [Mon, 2 Mar 2015 02:20:53 +0000 (18:20 -0800)]
[perl #123849] sv.c: Fix sv_clear -Do output

We try to print ‘sv_clear clearing PL_stashcache for '%"SVf"'’, but
the sv here is a hash, and we can’t do SvPV on it.  We need the hash’s
name.  This has been this way since 103f5a36127.

9 years ago[perl #123955] Fix assert fail with 0 s/// in quotes
Father Chrysostomos [Mon, 2 Mar 2015 02:11:23 +0000 (18:11 -0800)]
[perl #123955] Fix assert fail with 0 s/// in quotes

This is related to bug #123617 and is a follow-up to eabab8bcc.

This code:

"@0{0s 000";eval"$"

begins tokenisation as follows:

stringify ( join ( $ " , @ 0 { 0 subst

When seeing the subst after the 0, the parser discards many tokens and
we end up at the ; outside the quotes.

Since PL_lex_stuff (the temporary spot for storing the contents of a
quote-like operator) is localised as of eabab8bcc, we end up with just
PL_sublex_info.repl (the temporary spot for storing the replacement
part) set.  Since it is still set when we get to the next double-
quote, it is treated as a two-part quote-like operator, like y or s.
That can’t happen, and we have assertions to make sure of it.

We need to localise PL_sublex_info.repl as well, so it gets freed
properly when scopes are popped after an error.

9 years ago[perl #123848] Allow OPpTARGET_MY on qr
Father Chrysostomos [Sun, 1 Mar 2015 22:01:27 +0000 (14:01 -0800)]
[perl #123848] Allow OPpTARGET_MY on qr

// in the scope of lexical $_ gets the OPpTARGET_MY flag set.  If it
is used as an operand to smartmatch, it gets converted to a qr op.
There is no need to turn off the flag, since it is harmless at run
time.  But we need to allow the flag on this op type to avoid asser-
tion failures when it is freed.

9 years agoop.c apidoc typo
Father Chrysostomos [Sun, 1 Mar 2015 21:27:39 +0000 (13:27 -0800)]
op.c apidoc typo

9 years ago[perl #123821] Fix assert fail with \(&$0)=0
Father Chrysostomos [Sun, 1 Mar 2015 21:26:52 +0000 (13:26 -0800)]
[perl #123821] Fix assert fail with \(&$0)=0

If the operand of a reference constructor that is assigned to is not
valid, then S_lvref (in op.c) queues an error and does not bother to
convert the op into an lvref op.  This causes problems, since we have
already set lvref-specific flags on the op in the expectation that its
type will change.  We get assertion failures later when freeing the
op, because of the invalid flags.

Instead of bailing out when we have an error like this, just continue
processing it, as we do in many other places.

9 years ago[perl #123817] Assert fail with attr in anon hash
Father Chrysostomos [Sun, 1 Mar 2015 21:16:36 +0000 (13:16 -0800)]
[perl #123817] Assert fail with attr in anon hash

These two one-liners were failing an assertion:

$y = { my $x : m }
$y = [ (my $x : m) ]

The lexical with an attribute was turning into an op of type ‘list’
with the OPpLVAL_INTRO flag set.  Many op constructors convert an
operand that is of type ‘list’ into the correct type, instead of
creating a new op to wrap around it.  Other ops were not expecting the
flag to be set, causing an assertion failure.  The easiest solution is
to turn off the flag in op_convert_list, which is where the op type
changes.  (I tried modifying other op types to accept the flag, but
that caused problems for B::Deparse, which inquires of B::Op_private
which ops can legitimately take that flag.)

9 years agoop.c: Remove redundant op_lvalue call
Father Chrysostomos [Sun, 1 Mar 2015 19:43:11 +0000 (11:43 -0800)]
op.c: Remove redundant op_lvalue call

Refgen ops already call op_lvalue on their operands.  Calling it
beforehand causes it to be called twice, which is harmless, but
wasteful.

9 years ago[perl #123802] Assertion failure with "\L\L"
Father Chrysostomos [Sun, 1 Mar 2015 19:29:10 +0000 (11:29 -0800)]
[perl #123802] Assertion failure with "\L\L"

This is a follow-up to f4460c6f7a.  The check to see whether we are
in a quote-like operator needs to come before the call to sublex_done,
as sublex_done is just as problematic as doing SvIVX on a PV.  (See
479ae48e22f for details on why.)  Checking the type of PL_linestr is
not a reliable way to see whether we are in a quote-like op, so use
PL_in_what instead.

9 years agot/op/lex.t: Correct bug num
Father Chrysostomos [Sun, 1 Mar 2015 19:20:47 +0000 (11:20 -0800)]
t/op/lex.t: Correct bug num

9 years ago[perl #123763] Clear target on my $_; split
Father Chrysostomos [Sun, 1 Mar 2015 06:31:25 +0000 (22:31 -0800)]
[perl #123763] Clear target on my $_; split

If a lexical $_ is in scope, then the first argument to split, which
starts out as a match op, will get the pad offset of $_ as its target,
since that’s how implicit lexical $_=~ usually works.

ck_split changes that first argument to a pushre op.  The target
was not being cleared.  That did not cause any problems, until
v5.21.4-408-gfd017c0, which optimised lexical @array = split to write
to split @array directly, by storing making lexical array’s pad offset
the pushre’s target.

You can see the obvious conflict there.  We end up trying to split to
$_, which is not an array.  On a debugging build, you get an assertion
failure when trying to extend $_.  Make the split list long enough,
and you get a crash on non-debugging builds.

debugging$ ./miniperl -e 'my $_; split'
Use of my $_ is experimental at -e line 1.
Assertion failed: (SvTYPE(av) == SVt_PVAV), function Perl_av_extend, file av.c, line 70.

non-debugging$ ./miniperl -e 'my $_; split //, "a"x100000'
Use of my $_ is experimental at -e line 1.
Segmentation fault: 11