So, I've worked out the issue (thanks to the previous updaters for locating the bug). sv_usepvn_flags is documented as expecting a pointer to malloced memory, and since perl's malloc does its accounting in line, will neither operate properly nor die cleanly if its passed a pointer to memory that isn't an address that it handed out to the rest of perl at some point. Specifically, if RCHECK is on, it maintains a guard value to make sure that illegitimate memory isn't being used, and since that guard value is written outside of the memory its allocating, its overwriting some essentially random address in memory. Considering what sv_sethek needs from sv_usepvn_flags - just the SV_CHECK_THINKFIRST_COW_DROP, SvPV_set, SvCUR_set (since SvLEN_set is overwritten immediately after the call anyway), and SvTAINT (although I admit I don't know if this is necessary), inlining those calls into sv_sethek directly instead of via sv_usepvn_flags gets my perl to build again, and make test finds all tests pass. Attached is a patch.Thread Previous