Core-dump when using main::__DATA__ and main::__END__
Somhow when the second perl_destruct is run, perl will coredump in ioclose. I suspect that this is because __DATA__ isn't closed properly. I spent 4-5 hours finding this bug because I put in __END__ to comment out some code in one of my test scripts. Sigh.
hv_* functions do not respect pTHX argument
Seems like they don't allocate the string cache in the correct interpreter so you need to wrap them in set_context, this also took some time to figure out, this is also probobly a reason to some other mystical bug I have been seeing. I don't realy know if this is a bug here or in perl_destruct but perl_destruct cleans up a string buffer table it does not own.