Vincent Pit [Sat, 2 Oct 2010 23:35:11 +0000 (01:35 +0200)]
Skip threads tests unless perl version is 5.13.4 or greater
There was a long standing bug in the handling of GV <-> CV double linkage
that could (and explicitely did with a poisonous perl) cause segfaults at
thread destruction. It got fixed by Dave in commit 803f274 which went in
5.13.3, but the fix was amended for 5.13.4 in commit 09aad8f. Since it's
not really fair for the user to not be able to install the module because
of this, we skip the threads tests unless perl is at least 5.13.4.
Vincent Pit [Mon, 23 Aug 2010 09:19:23 +0000 (11:19 +0200)]
Always get the hint directly from %^H
Since we explicitely ensure that we only fetch the hint at compile time, we
should always be able to get it from %^H. However, the require propagation
bug was fixed for %^H only in 5.12, while it was fixed in 5.10.1 for the
internal hint chain. So we also have to enable the require propagation
workaround on 5.10.1.
Vincent Pit [Thu, 19 Aug 2010 15:19:38 +0000 (17:19 +0200)]
Remove some dead code in indirect_ck_method
We already check that the first kid of the method op is a const op. Thus
it must have been checked before. Otherwise, someone has returned a const
op from a custom check function and haven't recalled in the old check
chain, which is bad and ultimately their fault.
Vincent Pit [Thu, 19 Aug 2010 15:05:48 +0000 (17:05 +0200)]
Store the offset from the source buffer beginning in the op info object
This fixes potential errors where some indirect constructs are wrongly
reported (or failed to be) when the source buffer is grown between the
method and the object name.
Also, from now on, an op info object is never stored when the correct
position could not have been found in the source buffer. This is really
how it should have behaved from the beginning.
Vincent Pit [Mon, 16 Aug 2010 14:38:45 +0000 (16:38 +0200)]
Get rid of the linestr check
It simplifies the code, remove some potential breakage if the linestr
changes inside an indirect expression, and allows for reporting indirect
constructs in quotelike environments.
Vincent Pit [Fri, 28 Aug 2009 17:18:24 +0000 (19:18 +0200)]
Reset the callbacks when the root interpreter is destroyed
This fix segfaults when the pragma is first loaded from inside a thread.
The global state for the root interpreter is also freed, so it won't leak
anymore.
Vincent Pit [Thu, 27 Aug 2009 22:14:08 +0000 (00:14 +0200)]
Use the hint pointer as the unique identifier for the %^H entry
The previous solution (using the callback CV) could cause pragma leaks if
you specified the same "hook" (i.e. a reference to the same sub) in two
different require scopes.
Vincent Pit [Wed, 15 Jul 2009 16:15:42 +0000 (18:15 +0200)]
Turn on CvCLONE for all anonymous subs passed as hooks
So that they're cloned later, which seems to fix some strange issues that arose with a5339a6ced4d5e3ad1541320476c3d6bf8ff9408 when the default callbacks were no longer capturing an external pad (which used to make them eligible for cloning).
Vincent Pit [Thu, 28 May 2009 22:34:04 +0000 (00:34 +0200)]
Prevent bogus invalid syntaxes caused by reallocated memory chunks
Make sure that all our check functions reset a possible previous entry in the pointer table. Then, check in ck_entersub that the object op (the first kid after the pushmark) is of a proper type, so that we are pretty sure that its map entry has been either reset or filled.