On Sat, Aug 11, 2001 at 06:18:19AM +0530, Abhijit Menon-Sen wrote:
> At 2001-07-30 20:05:27, abigail@foad.org wrote:
> >
> > That is, the first time a tied scalar is fetched, it is fetched twice.
>
> This happens when the return value from FETCH is tainted. The FETCH adds
> taint magic to the SV, which confuses mg_get() into walking the linked
> list of magic twice.
>
> This patch makes mg_get() a lot smarter about handling changes to the
> list while it's running. It fixes the problem and passes all tests, but
> I'd appreciate reviews, since it's not an entirely trivial change.
Thanks, applied.
> Incidentally:
>
> 1. Does the SV ever actually get upgraded, as the old comments suggest?
> When? (I can find nothing in the core which does this.)
>
> 2. Does anything depend in particular upon the order in which the magic
> vtbl functions are called? I first tried was changing sv_magic() to
> add to the end of the list instead, but that broke a lot of things
> (which I think I'll go back and investigate.)
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
Thread Previous
|
Thread Next