_sre recursion limit

Tim Peters tim.one at home.com
Sat Jun 30 22:09:02 EDT 2001


[Darrell]
> I was surprised by the recursion limit problem, thinking it was fixed.
>
> Discovered the fix disabled and couldn't find bug #133283
>
> Line 1083 in _sre.c
>     /* FIXME: the following fix doesn't always work (#133283) */
>             if (0 && rp->pattern[2] == 65535) {
>
> So I enabled it and the self test passed. "import test.test_re"
> My needs are meet by this fix.
>
> Can we find a test case it breaks?

It's not so much the specific test case as the specific platform you run it
on.  C defines no way to determine whether you're "about to" run out of
stack space, so this is nightmarish cross-platform hackery.

> _sre.pyd with the 'if' enabled.  http://ezwiki.com/sre

So you've tried it on *some* flavor of Windows.  And that's all?  That would
explain why you think it's fixed and /F doesn't <wink>.





More information about the Python-list mailing list