in reply to Re^3: Attempt to free unreferenced scalar in File::Copy (ActivePerl)
in thread Attempt to free unreferenced scalar in File::Copy (ActivePerl)

To my knowledge, this can only occur when a reference is passed between two separate instances of the Perl Interpreter running within the same process

All it takes is an inappropriate SvREFCNT_dec() in XS code to generate the error:
use warnings; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'EOC'; SV * foo() { SV * y = newSViv(42); SvREFCNT_dec(y); return y; } EOC foo();

Cheers,
Rob
  • Comment on Re^4: Attempt to free unreferenced scalar in File::Copy (ActivePerl)
  • Download Code