[perl #90006] out of memory during thread clone
authorDavid Mitchell <davem@iabyn.com>
Mon, 6 Jun 2011 18:09:31 +0000 (19:09 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 6 Jun 2011 18:44:35 +0000 (19:44 +0100)
commitf144f1e3c6a65ce611177737a21b1166f07ef373
tree598314e72d78bb9a268a7e0443575b75e37594c7
parent50f626ad600f0bdc3dd1e79057149c3dca9e2f45
[perl #90006] out of memory  during thread clone

If you run out of memory during thread cloning, exit() may be called which
will unwind the context stacks, and be very unhappy if there aren't any.
Which there might not be if we haven't allocated any yet during cloning.

We can't just fix this by creating them earlier during the cloning
sequence, because creating them requires calling malloc(), which
may fail and exit...

So just check for this condition during stack unwind.
pp_ctl.c