[Python-Dev] USE_STACKCHECK/PyOS_CheckStack
Jack Jansen
jack@oratrix.nl
Thu, 06 Jul 2000 11:12:10 +0200
> a) Add comments to the #ifdef's saying they're for the Mac. "Mystery code"
> is bad in group-maintained software. I expect Jack will maintain that it
> isn't really Mac-specific, but a wonderful feature for any platform that
> cares to #define USE_STACKCHECK and PyOS_CheckStack. Then I preemptively
> sneer in his general direction <wink>.
Hehheh:-)
But I think it actually is used by some of the other ports. Any platform that
doesn't guarantee a vm-hole between the stack and everything else should use a
stack check, and this'll probably include all the handhelds and such.
> b) Wonder out loud why this code is useful on a Mac but not other platforms.
> We can get segfaulting recursion while print'ing and repr'ing on all
> platforms. So shouldn't we work to catch that on all platforms too? Macs
> shouldn't be something special wrt this.
Well, a segfault is bad, but silently pushing the stack into the heap or into
other random data is worse. And as the stackcheck isn't free it isn't used on
other platforms. Moreover, I'm not even sure you can determine the stack limit
on all platforms...
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm