http://www.perlmonks.org?node_id=994710


in reply to "double free or corruption" in Perl 5.16.0 but not in 5.14.2

I reproduced this with bleadperl. This patch fixes the problem and all core tests pass, but it doesn't quite pass my eyeball test. It's worth filing a bug with p5p.

diff --git a/ext/File-Glob/Glob.xs b/ext/File-Glob/Glob.xs index 3ea0590..f8bc20f 100644 --- a/ext/File-Glob/Glob.xs +++ b/ext/File-Glob/Glob.xs @@ -237,8 +237,8 @@ csh_glob(pTHX_ AV *entries, SV *patsv) SV **svp = AvARRAY(patav); while (items--) { PUSHMARK(SP); - PUTBACK; doglob(aTHX_ SvPVXx(*svp++), flags); + PUTBACK; SPAGAIN; { dMARK;