This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #90006] cloning crashes during Out of Memory
Perl's malloc has a $^M facility to create an emergency memory
allocation during an Out Of Memory crisis. This requires accessing
PL_defstash. In perl_clone_using(), in debugging builds, the Idefstash
field was intially poisoned, and before it had a chance to be properly
initialised, malloc() may have been called.
Fix this by initialising PL_defstash to NULL early on.