Set PL_statgv to null when freed or coerced
authorFather Chrysostomos <sprout@cpan.org>
Fri, 13 Jan 2012 23:50:51 +0000 (15:50 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 14 Jan 2012 05:24:54 +0000 (21:24 -0800)
commit97c226b87fecccdf4a4af5defd1836198a9666e5
treef603e15adbff722a3289a39680687dfb3fd7636d
parentde61bf2ac7b4130886e0d3b93c1f0e22b7dfaec3
Set PL_statgv to null when freed or coerced

If PL_statgv is not set to null when freed, that same SV could be
reused for another GV, in which case -T _ will then use another handle
unrelated to the previous stat.

Similarly, if PL_statgv points to a fake glob that gets coerced into
a non-glob before it is freed, it will not follow the code path in
sv_free that sets PL_statgv to null.  Furthermore, if it becomes a GV
again, it could be a completely different filehandle, unrelated to the
previous stat.
sv.c
t/op/filetest.t