in reply to Re: Segmentation fault
in thread Segmentation fault

Doesn't it seem like perl should have a cleaner way of recovering from this?
$SIG{__ATROOSS__} = sub { die "about to run out of stack space!!" };

This and the regexp one have always bugged the crap out of me.

-Paul

Replies are listed 'Best First'.
Re^3: Segmentation fault
by Joost (Canon) on Jun 25, 2007 at 20:21 UTC
      Does anyone know if that's a general stack fix or just fixes the regex engine?
      Just the regex engine

      Dave.

Re^3: Segmentation fault
by jasonk (Parson) on Jun 26, 2007 at 12:56 UTC

    The problem is there is no portable way to determine that you are about to run out of stack space...


    We're not surrounded, we're in a target-rich environment!
      I know almost nothing about it ... but it seems to me you could set a static limit for arch where there's no way to check how much stack space is left? Or is it dynamically allocated at random sizes on those platforms?

      Is it unreasonable to keep track of this sort of thing some place other than the stack? (I seem to recall the word heap for this context or something similar to it.)

      -Paul