in reply to Re^2: [I::C] Why does it segfault? (NDEBUG?)
in thread [I::C] Why does it segfault?

Ah. I was reading code not documentation. :)

SV * Perl_newSV(pTHX_ const STRLEN len) { dVAR; register SV *sv; new_SV(sv); if (len) { sv_upgrade(sv, SVt_PV); SvGROW(sv, len + 1); } return sv; }
I believe I::C will take care of that for me.

Indeed. Inline::C-Cookbook makes that clear (though doesn't take the credit):

In this example the sv_2mortal call gets done under the hood by XS, because we declared the return type to be SV*.

Thanks.

- tye