A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/020944.html below:

[Python-Dev] multiple recursion limit bugs

[Python-Dev] multiple recursion limit bugsSkip Montanaro skip@pobox.com
Mon, 11 Mar 2002 11:25:08 -0600
    [... regarding sre recursion limits ...]
    >> 
    >> I recently added an example that demonstrates the problem, but I
    >> think the main issue is that the limitation needs to be better
    >> documented.  We can then close most/all of these bug reports as "not
    >> a bug" or "known implementation limitation".  Does this seem like the
    >> right approach?

    Jack> As long as all the stack overflow possibilities are protected with
    Jack> PyOS_CheckStack() calls. In the past that wasn't always the case,
    Jack> and this created havoc on operating systems without hardware stack
    Jack> limits.

I looked in _sre.c and saw that it does call PyOS_CheckStack, but it's
guarded by the USE_STACKCHECK macro:

    #if defined(USE_STACKCHECK)
        if (level % 10 == 0 && PyOS_CheckStack())
            return SRE_ERROR_RECURSION_LIMIT;
    #endif

That's defined in Include/pythonrun.h for a few platforms:

    #if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER)
    /* Enable stack checking under Microsoft C */
    #define USE_STACKCHECK
    #endif

Should it also be defined for MacOS versions predating MacOS X (or is this
defined elsewhere for the Mac platform)?

Skip



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