Ralf Schmitt added the comment:

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()

Added file: http://bugs.python.org/file8679/patch

____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue846388>
____________________________________

Attachment: patch
Description: Binary data

_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to