>>>>> "MAL" == M -A Lemburg <mal@lemburg.com> writes: >> I don't see an obvious solution. Is there any way to implement >> PyOS_CheckStack on Unix? I imagine that each platform would have >> its own variant and that there is no hope of getting them >> debugged before 2.0b1. MAL> I've looked around in the include files for Linux but haven't MAL> found any APIs which could be used to check the stack size. MAL> Not even getrusage() returns anything useful for the current MAL> stack size. Right. MAL> For the foo() example I found that on my machine the core dump MAL> happens at depth 9821 (counted from 0), so setting the MAL> recursion limit to something around 9000 should fix it at least MAL> for Linux2. Right. I had forgotten about the MAX_RECURSION_LIMIT. It would probably be better to set the limit lower on Linux only, right? If so, what's the cleanest was to make the value depend on the platform. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4