8 months agostalled sprout/defelem
Father Chrysostomos [Tue, 28 Jan 2014 04:07:20 +0000]
stalled

8 months agoperldelta for Cow Tools
Father Chrysostomos [Thu, 23 Jan 2014 05:31:04 +0000]
perldelta for Cow Tools

I somehow missed this.

9 months agoMaintainers.pl: No point in listing the same hash key twice
Father Chrysostomos [Wed, 22 Jan 2014 00:17:52 +0000]
Maintainers.pl: No point in listing the same hash key twice

9 months agoAdd t/op/and.t
Father Chrysostomos [Mon, 20 Jan 2014 14:25:09 +0000]
Add t/op/and.t

A place for &&-specific tests, based on t/op/or.t.

I am adding this as a separate commit, since I have a bad habit
of reapplying commits repeatedly and then forgetting to re-add files
(which then get deleted before I can commit them).

The next commit will use this.

9 months ago[perl #120374] Stop for($h{k}||'') from vivifying
Father Chrysostomos [Mon, 20 Jan 2014 14:18:32 +0000]
[perl #120374] Stop for($h{k}||'') from vivifying

Commit 2e73d70e52 broke this (made it vivify) by propagating lvalue
context to the branches of || and && (to fix another bug).  It broke
App::JobLog as a result.

Because foreach does not do defelem magic (i.e., it vivifies), this
ends up extending vivification to happen where it did not before.

Fixing foreach to do defelem magic (create ‘deferred element’ scalars,
the way sub calls do, to avoid vivifying immediately) would be another
way to fix this.  (And I plan to do it soon anyway.  That is the topic
of ticket #115194.)

However, to create a deferred element on the lhs of || would be a
waste, since the newly-created SV will evaluate to false, and will be
thrown away immediately.

So, when the lhs of || is helem or aelem, we can simply refram from
applying lvalue context, and the result is exactly the same as we
would get from applying defelem magic, but faster.

9 months agosv.c, Perl_dirp_dup: Skip the fchdir sections if telldir and seekdir are not defined
Brian Fraser [Sat, 18 May 2013 02:13:55 +0000]
sv.c, Perl_dirp_dup: Skip the fchdir sections if telldir and seekdir are not defined

9 months agoUpdate Scalar-List-Utils to CPAN version 1.37
Chris 'BinGOs' Williams [Tue, 21 Jan 2014 14:57:36 +0000]
Update Scalar-List-Utils to CPAN version 1.37

  [DELTA]

1.37 -- 2014/01/21 14:44:34
   [BUGFIXES]
   * Fix unweaken() for perls < 5.14; need to use sv_setsv() to undef
     rather than sv_clear() (RT92226)

9 months agoversion and Module-CoreList are up to date with CPAN
Chris 'BinGOs' Williams [Tue, 21 Jan 2014 14:56:42 +0000]
version and Module-CoreList are up to date with CPAN

9 months agodocument $^P's 0x800 and 0x1000
Ricardo Signes [Mon, 20 Jan 2014 23:40:16 +0000]
document $^P's 0x800 and 0x1000

these were introduced in c30d8139e

9 months agocreate new perldelta for 5.19.9
Ricardo Signes [Mon, 20 Jan 2014 22:36:17 +0000]
create new perldelta for 5.19.9

9 months agoadd the 5.19.8 epigraph
Ricardo Signes [Mon, 20 Jan 2014 22:31:27 +0000]
add the 5.19.8 epigraph

9 months agofix an epigraph typo
Ricardo Signes [Mon, 20 Jan 2014 22:16:35 +0000]
fix an epigraph typo

His name is Milo Minderbinder.

He is twenty-seven years old.

9 months agobump version to 5.19.9!
Ricardo Signes [Mon, 20 Jan 2014 22:02:44 +0000]
bump version to 5.19.9!

9 months agoMerge tag 'v5.19.8' into blead
Ricardo Signes [Mon, 20 Jan 2014 22:01:18 +0000]
Merge tag 'v5.19.8' into blead

Ninth release of the v5.19 series!

9 months agoperldelta: add the 5.19.8 acknowledgements v5.19.8
Ricardo Signes [Mon, 20 Jan 2014 20:54:04 +0000]
perldelta: add the 5.19.8 acknowledgements

9 months agorename sTHX to PERL_MEMORY_DEBUG_HEADER_SIZE
David Mitchell [Mon, 20 Jan 2014 14:24:02 +0000]
rename sTHX to PERL_MEMORY_DEBUG_HEADER_SIZE

Originally this macro evaluated to the size of the THX pointer;
this was used with the memory pool facility to store the context of the
caller of the malloc() for debugging. Later, the header of the malloc()
stored more than just the context, so sTHX became a mismoner.

Rename it to something less misleading.

9 months agoPrevent V-magic from being stripped by locale fix
John Peacock [Fri, 17 Jan 2014 19:43:34 +0000]
Prevent V-magic from being stripped by locale fix

version/t/00impl-pp.t was failing with locales

See thread beginning
    <20140113132518.GA11721@iabyn.com>

9 months agoperlhist: note that 5.19.8 should be released today
Ricardo Signes [Mon, 20 Jan 2014 12:52:37 +0000]
perlhist: note that 5.19.8 should be released today

9 months agothrreads::shared: LEAVE in BOOT had wrong context
David Mitchell [Mon, 20 Jan 2014 12:03:15 +0000]
thrreads::shared: LEAVE in BOOT had wrong context

In Perl_sharedsv_init() - which is called from the threads::shared BOOT
code - it creates a new shared interpreter, then tries to undo the ENTER
done as the last step of the perl_construct(PL_sharedsv_space) step, with
a LEAVE. But the LEAVE was being done in the context of the caller
interpreter rather than the shared one.

See the thread beginning <52D528FE.20701@havurah-software.org>

9 months ago[perl #121031] fix all of the other incorrect calls to fresh_perl_is()
Tony Cook [Mon, 20 Jan 2014 01:06:47 +0000]
[perl #121031] fix all of the other incorrect calls to fresh_perl_is()

The third argument to fresh_perl_is()/fresh_perl_like() is treated as
a hashref, passing a string is kind of strange.

9 months ago[perl #121031] pass a valid value for $runperl_args to fresh_perl_is()
Tony Cook [Mon, 20 Jan 2014 00:46:47 +0000]
[perl #121031] pass a valid value for $runperl_args to fresh_perl_is()

Alternative patch for the problems noticed by Tobias Leich

9 months agofix splice+isa test that got mangled when making splice.t use test.pl
Tobias Leich [Sat, 18 Jan 2014 19:53:45 +0000]
fix splice+isa test that got mangled when making splice.t use test.pl

See ce6d40e02d52b9152b44a5fc2180efda15a7d069

9 months agopod/perllexwarn.pod: clarify note about the "deprecated" category
Ævar Arnfjörð Bjarmason [Sun, 19 Jan 2014 16:45:13 +0000]
pod/perllexwarn.pod: clarify note about the "deprecated" category

Saying that something used to behave a certain way "In Perl 5.6.1" can
be understood as it changing in 5.6.2, but in fact this change to the
"deprecated" category in perl-5.6.0-8156-g12bcd1a was never released in
any 5.6.* release, it was first released in 5.8.0.

So note that explicitly instead, it's less ambiguous to just say "Before
Perl 5.8.0".

9 months agoperldelta: update module changes
Ricardo Signes [Sun, 19 Jan 2014 15:34:50 +0000]
perldelta: update module changes

used Porting/corelist-perldelta.pl!  thanks Abir Viqar and
Steve Hay!

9 months agoupdate Module::CoreList
Ricardo Signes [Sun, 19 Jan 2014 15:28:54 +0000]
update Module::CoreList

9 months agoupdate latest copyright year to 2014
Ricardo Signes [Sun, 19 Jan 2014 15:13:50 +0000]
update latest copyright year to 2014

9 months agoperldelta: prune unused sections and markers
Ricardo Signes [Sun, 19 Jan 2014 15:11:50 +0000]
perldelta: prune unused sections and markers

9 months agoperldelta for 1850f57f
Ricardo Signes [Sun, 19 Jan 2014 15:07:01 +0000]
perldelta for 1850f57f

9 months agoperldelta for addition of IO-Socket-IP
Ricardo Signes [Sun, 19 Jan 2014 14:38:54 +0000]
perldelta for addition of IO-Socket-IP

9 months agotentatively import IO-Socket-IP for consideration
Ricardo Signes [Sun, 19 Jan 2014 14:33:13 +0000]
tentatively import IO-Socket-IP for consideration

9 months agofix broken perl5197delta
Ricardo Signes [Sun, 19 Jan 2014 13:24:20 +0000]
fix broken perl5197delta

9 months agoperldelta for bfa371b621
Father Chrysostomos [Sun, 19 Jan 2014 05:50:13 +0000]
perldelta for bfa371b621

9 months agoperldelta for f60e676307
Father Chrysostomos [Sun, 19 Jan 2014 05:49:06 +0000]
perldelta for f60e676307

9 months ago[perl #119949] Stop undef *_, goto &sub from crashing
Father Chrysostomos [Sun, 19 Jan 2014 03:16:55 +0000]
[perl #119949] Stop undef *_, goto &sub from crashing

Commit 049bd5ffd62b fixed problems with the wrong @_ being visible
after *_ modification followed by goto.  In so doing, it made it
possible for a null to be placed at the start of the target sub’s
pad, because it was not checking that the array it got from PL_defgv
was actually non-null.  Simply adding the check makes everything work.

9 months ago[perl #119973] Treat initial { in format args as block
Father Chrysostomos [Sun, 19 Jan 2014 01:58:52 +0000]
[perl #119973] Treat initial { in format args as block

Commit 705fe0e5f8a inadvertently caused the hash-vs-block disambigua-
tion to apply at the beginning of a format argument line.  This commit
restores the implicit ‘do’, but only when the opening brace is the
first token on that line, not embedded within an expression.

In other words, this now has a block as before:

format =
{ foo => "bar" }
.

but this still produces a hash (in 5.16 it was a block):

format =
+{ foo => "bar }
.

9 months agoUse ASSUME in op.c:newBINOP
Father Chrysostomos [Sun, 19 Jan 2014 01:07:33 +0000]
Use ASSUME in op.c:newBINOP

This causes op.o to drop by 56 bytes for me under clang.

9 months agodiag.t: More exceptions
Father Chrysostomos [Sun, 19 Jan 2014 01:35:40 +0000]
diag.t: More exceptions

9 months agoregen customized.dat
Father Chrysostomos [Sun, 19 Jan 2014 01:32:29 +0000]
regen customized.dat

9 months agoMaintainers.pl: vutil.c is not customized any moer
Father Chrysostomos [Sun, 19 Jan 2014 01:31:50 +0000]
Maintainers.pl: vutil.c is not customized any moer

9 months agoExplicit ENTER/LEAVE block for upg_version
John Peacock [Sun, 19 Jan 2014 00:25:52 +0000]
Explicit ENTER/LEAVE block for upg_version

9 months agoLots of C optimizations for both speed/correctness
John Peacock [Sun, 12 Jan 2014 16:19:53 +0000]
Lots of C optimizations for both speed/correctness

Clean up a lot of the less efficient uses of various Perl
macros and functions, mostly from bulk88@hotmail.com.  Also
deal with the fact that older Perl's were not handling locale
setting in a consistent manner.  This means going back to the
less efficient but always correct method of ALWAYS copying the
old locale and switch to C and then restoring, for all Perl
releases prior to 5.19.0.  Discontinue support for Perl's prior
to v5.6.2.

9 months agoMake runperl normalize newlines with multiple output lines.
Craig A. Berry [Sat, 18 Jan 2014 19:27:57 +0000]
Make runperl normalize newlines with multiple output lines.

On VMS only, because rarely but occasionally (such as with
perl5db.t) runperl produces multiple lines of output and they
all need the same treatment.

9 months agoFix perl5db.t test 41 on VMS.
Craig A. Berry [Sat, 18 Jan 2014 19:22:25 +0000]
Fix perl5db.t test 41 on VMS.

We're getting newlines in between items, and the easiest way to
deal with it is make them explicit so we expect what we're getting
and it's done the same everywhere.

9 months agoext/POSIX/t/time.t: Conditionalize the use of setlocale/LC_TIME
Brian Fraser [Fri, 26 Apr 2013 07:10:16 +0000]
ext/POSIX/t/time.t: Conditionalize the use of setlocale/LC_TIME

On Android, all locales are simply disabled, which broke the assumption
that LC_TIME is always available.

9 months agot/op/threads-dirh.t: Only test telldir and seekdir if they are available
Brian Fraser [Sat, 18 May 2013 00:56:00 +0000]
t/op/threads-dirh.t: Only test telldir and seekdir if they are available

9 months agot/op/getpid.t: Silence undef warnings if getconf doesn't exist.
Brian Fraser [Thu, 16 May 2013 09:34:17 +0000]
t/op/getpid.t: Silence undef warnings if getconf doesn't exist.

If a platform has getppid() but not getconf and we're building a
threaded perl, this file would've shown undef warnings, although
no tests were affected.

9 months agot/op/magic.t: Comment for an unlink test
Jess Robinson [Fri, 19 Apr 2013 11:08:34 +0000]
t/op/magic.t: Comment for an unlink test

9 months agot/run/switches.t: Skip setlocale tests if !d_setlocale
Jess Robinson [Fri, 19 Apr 2013 11:08:34 +0000]
t/run/switches.t: Skip setlocale tests if !d_setlocale

9 months agot/op/taint.t: Skip crypt tests if !d_crypt
Jess Robinson [Fri, 19 Apr 2013 11:08:34 +0000]
t/op/taint.t: Skip crypt tests if !d_crypt

9 months agot/lib/warnings/9uninit: Skip crypt tests if !d_crypt
Jess Robinson [Fri, 19 Apr 2013 11:08:34 +0000]
t/lib/warnings/9uninit: Skip crypt tests if !d_crypt

9 months agoDynaLoader: Pure-perl mod2fname shouldn't use %Config at runtime
Brian Fraser [Sat, 18 Jan 2014 13:03:00 +0000]
DynaLoader: Pure-perl mod2fname shouldn't use %Config at runtime

This is somewhat obscure.  Previously, mod2fname would've tried
accessing $Config{dlext} each time it was called.  The reason this
can be problematic is that mod2fname can be called during global destruction,
after %Config is freed but before its magic is.  This was causing
Devel::GlobalDestruction's tests to fail on builds with -Dd_libname_unique.

This commit grabs the data we need when DynaLoader.pm is being built in
DynaLoader_pm.PL, so it no longer need to depend on %Config.

9 months agoIncrease $Hash::Util::FieldHash::VERSION to 1.14
Father Chrysostomos [Sat, 18 Jan 2014 13:52:08 +0000]
Increase $Hash::Util::FieldHash::VERSION to 1.14

9 months agoHash::Util::FieldHash: fix broken pod link
Father Chrysostomos [Sat, 18 Jan 2014 13:47:22 +0000]
Hash::Util::FieldHash: fix broken pod link

9 months agoIncrease $threads::shared::VERSION to 1.46
Father Chrysostomos [Sat, 18 Jan 2014 13:44:17 +0000]
Increase $threads::shared::VERSION to 1.46

9 months agoperldelta typo
Father Chrysostomos [Sat, 18 Jan 2014 13:42:03 +0000]
perldelta typo

9 months agothreads::shared: Don’t link to moving targets
Father Chrysostomos [Sat, 18 Jan 2014 13:36:52 +0000]
threads::shared: Don’t link to moving targets

The Scalar::Util documentation has changed, so the links are broken.
But we cannot just update the link targets, as threads::shared is
living a double life and may be installed along with an older
Scalar::Util.

9 months agoperldiag: Rewrap autoderef entries
Father Chrysostomos [Sat, 18 Jan 2014 01:39:38 +0000]
perldiag: Rewrap autoderef entries

for better splain output

9 months agoperldelta for 88c342510b9
Father Chrysostomos [Sat, 18 Jan 2014 01:32:17 +0000]
perldelta for 88c342510b9

9 months agoperldelta for 6567ce2473
Father Chrysostomos [Sat, 18 Jan 2014 01:28:56 +0000]
perldelta for 6567ce2473

9 months agoMention perlbug -p in perlhack.
Craig A. Berry [Sat, 18 Jan 2014 03:46:08 +0000]
Mention perlbug -p in perlhack.

Using git's --attach with perlbug -f actually mangled the patches,
making them harder to apply, but now we have a better way to do it.

9 months agoperldelta for perlbug changes.
Craig A. Berry [Sat, 18 Jan 2014 00:04:58 +0000]
perldelta for perlbug changes.

9 months agoMake perlbug Unicode-aware.
Craig A. Berry [Wed, 1 Jan 2014 18:31:02 +0000]
Make perlbug Unicode-aware.

Try to do input in whatever the locale wants and output raw in
hopes that will best survive mail transport.

Except when reading in a patch file, we'll also use raw for input
because there may be multiple encodings in the patch, and we'll
also use raw for input when reading in the report file that we've
written out raw.

We attempt to detect the locale encoding using the private and
undocumented _get_locale_encoding() function of the deprecated
encoding pragma module.  But it's what the open pragma does and
we protect ourselves by checking that it's available and falling
back to an empty layer specification ("<:") if we can't load that
function.  That should also give us something workable when there
is no dynamic loading, such as under miniperl.

9 months agoSwitch perlbug mail sender on VMS.
Craig A. Berry [Sat, 16 Nov 2013 02:55:58 +0000]
Switch perlbug mail sender on VMS.

The VMS mail utility can't do attachments because it always adds
a blank line in front of any headers you add.  So use the Send
From File utility, which has been documented and supported for
any release in the last decade and was latently present before
that.

It takes the whole message verbatim just like sendmail, but also
needs the envelope prepended.

9 months agoAdd perlbug -p option for attaching patches.
Craig A. Berry [Sun, 10 Nov 2013 00:42:57 +0000]
Add perlbug -p option for attaching patches.

Log files and other text attachments should also be fine as long
as they aren't big enough to be rejected by RT.

Only text attachments are supported, as other kinds would involve
wrestling with myriad MIME types and possibly content transfer
encodings.  This should be fine for binary patches, though, as
git format-patch encodes those in Base85, so the patch file itself
is still text.

9 months agoperldelta for 901ee108fe
Father Chrysostomos [Fri, 17 Jan 2014 15:51:23 +0000]
perldelta for 901ee108fe

9 months agoperldelta for ceaf124e0
Father Chrysostomos [Fri, 17 Jan 2014 15:43:08 +0000]
perldelta for ceaf124e0

9 months agoAdded config.arch to .gitignore
Brian Fraser [Fri, 17 Jan 2014 16:16:06 +0000]
Added config.arch to .gitignore

9 months agoconfig.h: Remove the exceptions for cross-compilation builds
Brian Fraser [Wed, 15 Jan 2014 09:42:35 +0000]
config.h: Remove the exceptions for cross-compilation builds

This makes it so that the values for MEM_ALIGNBYTES and BYTEORDER
are taken from config.sh, instead of always getting a default.

9 months agoINSTALL: Document -Dsysroot
Brian Fraser [Thu, 16 Jan 2014 11:15:10 +0000]
INSTALL: Document -Dsysroot

9 months agoAdd missing $run prefix to some Configure tests
Jess Robinson [Sat, 29 Dec 2012 21:27:13 +0000]
Add missing $run prefix to some Configure tests

9 months agoIntroduce $targetport to allow running on a non-standard ssh port
Jess Robinson [Tue, 15 Jan 2013 10:26:22 +0000]
Introduce $targetport to allow running on a non-standard ssh port

Such as when using user networking on qemu and redirecting a local port
to the emulator ssh

9 months agoStore the targetdir, targethost from Configure in config.sh for later.
Jess Robinson [Thu, 31 Jan 2013 14:12:31 +0000]
Store the targetdir, targethost from Configure in config.sh for later.

9 months agoConfigure: Remove "was file copied" check using run-ssh
Jess Robinson [Tue, 15 Jan 2013 10:26:22 +0000]
Configure: Remove "was file copied" check using run-ssh

This doesn't seem to be of much use.

9 months agoConfigure: If using targetarch, the computed binaries should stick
Brian Fraser [Tue, 19 Nov 2013 12:16:11 +0000]
Configure: If using targetarch, the computed binaries should stick

9 months agoConfigure: Don't skip the alignbytes test when crosscompiling
Brian Fraser [Mon, 13 Jan 2014 07:22:02 +0000]
Configure: Don't skip the alignbytes test when crosscompiling

9 months agoConfigure: Add $run to two tests
Brian Fraser [Mon, 13 Jan 2014 05:03:16 +0000]
Configure: Add $run to two tests

9 months agoConfigure: use $sysroot, if available, in checkccflags
Brian Fraser [Mon, 13 Jan 2014 05:00:43 +0000]
Configure: use $sysroot, if available, in checkccflags

If the user specified -Dsysroot but we don't use it, then the results can
be entirely off.

This also introduces an internal variable for Configure, _sysroot,
which is just "--sysroot=$sysroot", for use in places like checkccflags that
need --sysroot but don't need the other flags.

9 months agoConfigure: No need to skip the byteorder test when cross-compiling.
Brian Fraser [Sat, 11 Jan 2014 05:54:03 +0000]
Configure: No need to skip the byteorder test when cross-compiling.

This skip was added in 2001, but under the current model there's no
real reason to skip it.

9 months agoFix two Configure tests when targethost is set
Jess Robinson [Sat, 29 Dec 2012 21:23:01 +0000]
Fix two Configure tests when targethost is set

9 months agoConfigure: When cross-compiling, look for *-gcc* instead of *-*-gcc
Brian Fraser [Fri, 11 Oct 2013 19:52:48 +0000]
Configure: When cross-compiling, look for *-gcc* instead of *-*-gcc

Ditto with g++. This allows us to use, for example, ntox86-gcc or
x86_64-w64-mingw32-g++.exe to cross-compile, and have Configure detect
most things automatically.

9 months agoSet appropriate flags for linux or linux-like systems.
Jess Robinson [Sat, 29 Dec 2012 21:26:27 +0000]
Set appropriate flags for linux or linux-like systems.

This means that osnames that look like *linux*, like linux-androideabi
or linux-gnueabihf are treated like linux systems.

9 months agosv_buf_to_rw can be static
Father Chrysostomos [Fri, 17 Jan 2014 14:30:57 +0000]
sv_buf_to_rw can be static

sv_buf_to_ro needs to be non-static because op.c uses it, but
sv_buf_to_rw is only called from sv.c.

9 months agoAlways define sTHX as 0 when not using mem debug header
Father Chrysostomos [Fri, 17 Jan 2014 14:11:02 +0000]
Always define sTHX as 0 when not using mem debug header

I broke the threaded build in b001a0d149 by assuming that sTHX was
always set to 0 when memory debug headers were not in use.  That is
an easy assumption to make, so this commit makes that assumption true.
(And there is no reason it cannot be made true.  There is no need for
sTHX to be set under PERL_IMPLICIT_CONTEXT but not PERL_TRACK_MEMPOOL,
where sTHX was not even used before b001a0d149.)

9 months ago[Merge] Cow Tools
Father Chrysostomos [Fri, 17 Jan 2014 02:03:35 +0000]
[Merge] Cow Tools

This branch provides a PERL_DEBUG_READONLY_COW mode that turns COW
violations into crashes.  It also add documentation to perlguts
explaining how to handle COW strings in XS code.

There are two ‘known’ failures in IO::Compress’ tests.  A patch has
been sent upstream.

(Apologies to Gary Larson.)

9 months agoutil.c: A couple of defines to simplify #ifdef maze
Father Chrysostomos [Sun, 12 Jan 2014 00:45:18 +0000]
util.c: A couple of defines to simplify #ifdef maze

No real simplification in terms of the number of #ifdefs, but more
readability (hopefully).

9 months agoSkip t/re/uniprops.t under PERL_DEBUG_READONLY_COW
Father Chrysostomos [Fri, 3 Jan 2014 13:58:22 +0000]
Skip t/re/uniprops.t under PERL_DEBUG_READONLY_COW

Under Linux, using mmap for all memory allocation stops working when we
get up to 70,000 lines of code.  So just skip it.

9 months agoSvGROW should un-cow under PERL_OLD_COPY_ON_WRITE
Father Chrysostomos [Thu, 2 Jan 2014 20:39:05 +0000]
SvGROW should un-cow under PERL_OLD_COPY_ON_WRITE

Otherwise pp_uc (and presumably other pieces of code) will end up mod-
ifying shared buffers.

Brought to you by PERL_DEBUG_READONLY_COW.

9 months agoperldiag for new mprotect warnings
Father Chrysostomos [Mon, 30 Dec 2013 00:47:43 +0000]
perldiag for new mprotect warnings

9 months agoTeach podcheck about mmap(2)
Father Chrysostomos [Mon, 30 Dec 2013 00:39:36 +0000]
Teach podcheck about mmap(2)

9 months agoCOW documentation
Father Chrysostomos [Sat, 28 Dec 2013 14:06:27 +0000]
COW documentation

plus read-only documentation, since hysterically the two are
intertwined.

9 months agoXS::APItest: Flatten src for utf16_to_utf8_reversed
Father Chrysostomos [Thu, 12 Dec 2013 23:26:01 +0000]
XS::APItest: Flatten src for utf16_to_utf8_reversed

utf16_to_utf8_reversed (the C function) modifies its input, so the XS
function of the same name should flatten the input to avoid modifying
shared buffers.

Brought to you by PERL_DEBUG_READONLY_COW.

9 months agothreads.t: Increase watchdog timeout
Father Chrysostomos [Mon, 6 Jan 2014 00:20:58 +0000]
threads.t: Increase watchdog timeout

PERL_DEBUG_READONLY_COW is too slow for a 60s timeout.

9 months agoMake XS::APItest::establish_cleanup protect existing stacks
Father Chrysostomos [Mon, 6 Jan 2014 00:09:35 +0000]
Make XS::APItest::establish_cleanup protect existing stacks

It causes pp_entersub to be called in odd places, which can cause the
context stack to be reallocated when an outer function call (like
pp_leavesub) has a pointer into the context stack in a C auto.

cleanup.t was failing for me under PERL_DEBUG_READONLY_COW +
STRESS_REALLOC + threads, because the context stack was reallocated
and the old address then freed and reused for something else, being
zeroed in the mean time.  So pp_leavesub returned NULL (trying to
read retop from the context stack), causing the program to exit.
During global destruction, subs that had not be exited properly were
undefined, leading to:

1..3
Can't undef active subroutine during global destruction.

9 months agoPERL_DEBUG_READONLY_COW
Father Chrysostomos [Wed, 4 Dec 2013 12:39:14 +0000]
PERL_DEBUG_READONLY_COW

Make perls compiled with -Accflags=-DPERL_DEBUG_READONLY_COW to turn
COW buffer violations into crashes.

We do this using mmap to allocate memory and then mprotect to mark
memory as read-only when buffers are shared.

We have to do this at the safesysmalloc level, because some code does
SvPV_set with buffers it allocates on its own via safemalloc().

Unfortunately this means many things are allocated using mmap that
will never be marked read-only, slowing things down considerably, but
I see no other way.

Because munmap and mprotect need to know the length, we use the
existing sTHX/perl_memory_debug_header mechanism used already by
PERL_TRACK_MEMPOOL and store the size there (as PERL_POISON already
does when PERL_TRACK_MEMPOOL is enabled).  perl_memory_debug_header is
a struct positioned at the beginning of every allocated buffer, for
tracking things.

9 months agoUpdate Module-Load-Conditional to CPAN version 0.60
Chris 'BinGOs' Williams [Thu, 16 Jan 2014 20:06:49 +0000]
Update Module-Load-Conditional to CPAN version 0.60

  [DELTA]

0.60    Thu Jan 16 12:28:24 GMT 2014

* Added autoload option to can_load()

9 months agoregcomp.c: Remove unnecessary variable
Karl Williamson [Thu, 16 Jan 2014 17:26:16 +0000]
regcomp.c: Remove unnecessary variable

This variable is set and tested just once in all but one instance,
before being discarded.  In that one instance, it's tested twice.  The
underlying expression is just extracting a field from a structure.
There's no efficiency gain to using the variable, so might as well not
have it.

9 months agoTurn on read-only flag for some unchangeable inversion lists
Karl Williamson [Thu, 16 Jan 2014 17:23:31 +0000]
Turn on read-only flag for some unchangeable inversion lists

These lists are read-only.  Turning on the flag may allow some
optimisations to be done, including some that may be added in the
future.

9 months agoUpdate known POD issues
Chris 'BinGOs' Williams [Thu, 16 Jan 2014 16:20:08 +0000]
Update known POD issues

9 months agoUpdate Scalar-List-utils to CPAN version 1.36
Chris 'BinGOs' Williams [Thu, 16 Jan 2014 15:49:51 +0000]
Update Scalar-List-utils to CPAN version 1.36

  [DELTA]

1.36 -- 2014/01/16 15:40:47
  [CHANGES]
   * Added Scalar::Util::unweaken()
   * Various documentation changes/updates

  [BUGFIXES]
   * Correct uses of overload operators in unit tests (RT91969)

9 months ago[perl #89502] improved FreeMINT support
Tony Cook [Thu, 16 Jan 2014 04:37:27 +0000]
[perl #89502] improved FreeMINT support