Vincent Pit [Tue, 6 Sep 2016 21:33:16 +0000 (18:33 -0300)]
Skip len magic test on negative indices on recent perls
Starting from perl 5.25.4, this does not cause len magic to be triggered
anymore. It has been temporarily reverted from the core, but is likely to
come back, so this should appease the smokes.
Vincent Pit [Thu, 1 Oct 2015 13:09:17 +0000 (10:09 -0300)]
Execute magic callbacks into separate stacks
When magic triggered, stack corruption could occur since the magic callback
arguments were passed on the same stack as the ambient one. This issue has
long gone unnoticed because most ops first unpack their stack arguments
before processing magic, but also because this module is mostly used in
practice to capture magic outside of the usual program op structure were
the argument stack is relevant.
This was made visible with core change 6442877a (publicized in perl 5.22.0)
which caused get magic on transliterations to happen on the same C argument
list as a PUSHmortal. This resulted in an undefined behaviour which was
usually resolved by the magic being processed first (for example by gcc),
but cl.exe on win32 prefers to execute the PUSHmortal first, hence the
stack was corrupted.
Vincent Pit [Fri, 25 Sep 2015 10:54:47 +0000 (12:54 +0200)]
Improve support for custom ops
This was added to the core in commit 1830b3d9, which was publicized in perl
5.13.7. Note that our version is slightly different but simpler, since I
can't see how the op type might change during the call to OP_CLASS().
Vincent Pit [Fri, 25 Sep 2015 10:09:04 +0000 (12:09 +0200)]
Represent nulled COPs as B::COP objects
This change was added to the core B.xs in commit 619dadb5, which was made
public in perl 5.21.7. It is pretty unlikely that magic will ever be called
for these nulled ops, but it is better to keep our chunk of B.xs in sync
with the core.
Vincent Pit [Tue, 21 Jul 2015 15:09:57 +0000 (12:09 -0300)]
Simplify the timeout logic in t/09-load-threads.t
The old loop could actually never be executed more than one iteration.
A real good implementation would check whether any of the peers has exited,
but it would involve much more work.
Vincent Pit [Thu, 9 Apr 2015 18:12:26 +0000 (15:12 -0300)]
Don't lock the VMG_LOADED mutex across global destruction
If this mutex falls back to the OP_REFCNT mutex, and that a coderef is
freed during global destruction, the mutex is taken twice and the process
hangs. As a general rule, it does not seem very safe so we just set
vmg_loaded to zero early and only run the global teardown callback if
it is zero. This ensures that this callback will only be called once.
Vincent Pit [Wed, 8 Apr 2015 12:24:50 +0000 (09:24 -0300)]
Reference-count global setup/teardown
This fixes surprises like this one : module loaded in thread 1, then in
thread 2, then thread 1 ends and now the module does not work anymore in
thread 2 (even though it should).
Vincent Pit [Tue, 24 Mar 2015 19:54:30 +0000 (16:54 -0300)]
Update the ActivePerl/gcc-3.4 hack for EUMM 7.04
Starting from this version, PERL_ARCHIVE is quoted so we can no longer set
it to the empty string. Instead, we remove all occurrences of PERL_ARCHIVE
in the linking step section of the Makefile, which is OK since we specify
the perl DLL in other variables. This new technique is still valid for
older versions of EUMM.
Vincent Pit [Tue, 6 Aug 2013 03:23:30 +0000 (00:23 -0300)]
Get rid of t/99-kwalitee.t
New versions started to throw warnings if specific environment variables
are not set. This may be appropriate for dist manager users, but not really
for the rest of the world.
Since kwalitee metrics are either obvious or useless, there's no big loss
in removing this test anyway.
Vincent Pit [Fri, 2 Nov 2012 00:27:25 +0000 (22:27 -0200)]
Don't run the POD spelling test in taint mode
This causes the test to crash on perl 5.12 and below with sensitive
architectures like FreeBSD. Ultimately the root of the issue seems to have
been https://rt.perl.org/rt3/Public/Bug/Display.html?id=60378.