in reply to SV creation inside XS

I expect to have a hashref returned, but instead I got nothing. Why?
Because newSVrv() doesn't do what you think it does. It converts its arg into an RV and makes it point to a new, null SV that it creates, and returns.

You probably want newRV_noinc() instead.

Dave.