This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author schmir
Recipients effbot, joshhoyt, loewis, schmir
Date 2007-11-02.21:35:39
SpamBayes Score 0.026193414
Marked as misclassified No
Message-id <1194039340.83.0.909027746066.issue846388@psf.upfronthosting.co.za>
In-reply-to
Content
I'm attaching a working patch against 2.5.1 and a short test program.


#! /usr/bin/env python

import signal
import re
import time


def main():
    num=28 # need more than 60s on a 2.4Ghz core 2
    r=re.compile("a?"*num+"a"*num)

    signal.signal(signal.SIGALRM, signal.default_int_handler)
    signal.alarm(1)
    stime = time.time()
    try:
        r.match("a"*num)
    except KeyboardInterrupt:
        assert time.time()-stime<3
    else:
        raise RuntimeError("no keyboard interrupt")

if __name__=='__main__':
    main()
Files
File name Uploaded
patch schmir, 2007-11-02.21:35:40
History
Date User Action Args
2007-11-02 21:35:41schmirsetspambayes_score: 0.0261934 -> 0.026193414
recipients: + schmir, loewis, effbot, joshhoyt
2007-11-02 21:35:40schmirsetspambayes_score: 0.0261934 -> 0.0261934
messageid: <1194039340.83.0.909027746066.issue846388@psf.upfronthosting.co.za>
2007-11-02 21:35:40schmirlinkissue846388 messages
2007-11-02 21:35:40schmircreate