[Python-Dev] test_sre.py fails on Win64 because PyOS_CheckStack *never* fails

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Wed, 4 Oct 2000 23:34:50 +0200


trent wrote:
> I did not follow the discussion a while back regarding the implementation and
> use of PyOS_CheckStack on Windows. In any case, its use (USE_STACKCHECK)
> instead of recursion limit checking (USE_RECURSION_LIMIT) in _sre.c results
> in this test:
>     test(r"""sre.match(r'(x)*', 50000*'x').span()""", (0, 50000), RuntimeError)
> in test_sre.py failing on Win64.

note that the test assumes that 50000 iterations would be
enough to hit the stack limit.  maybe Win64 has a *huge*
stack?

what does this little program do:

    import sre
    sre.match(r'(x)*', 50000*'x').span()

if it prints (0, 50000), all is well, and the *test* should be
disabled (or modified) on Win64...

</F>