in reply to Re^4: Perl XS: garbage-collecting my malloc'd buffer (sv_grow?)
in thread Perl XS: garbage-collecting my malloc'd buffer

Yep, it would. SvGROW tries to be clever, and fails, unfortunately. (And the docs discourage using sv_grow directly, just to compound the potential problems)
  • Comment on Re^5: Perl XS: garbage-collecting my malloc'd buffer