ยปCore Development>Code coverage>Lib/test/crashers/infinite_loop_re.py

Python code coverage for Lib/test/crashers/infinite_loop_re.py

#countcontent
1n/a
2n/a# This was taken from http://python.org/sf/1541697
3n/a# It's not technically a crasher. It may not even truly be infinite,
4n/a# however, I haven't waited a long time to see the result. It takes
5n/a# 100% of CPU while running this and should be fixed.
6n/a
7n/aimport re
8n/astarttag = re.compile(r'<[a-zA-Z][-_.:a-zA-Z0-9]*\s*('
9n/a r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*'
10n/a r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]'
11n/a r'[][\-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*(?=[\s>/<])))?'
12n/a r')*\s*/?\s*(?=[<>])')
13n/a
14n/aif __name__ == '__main__':
15n/a foo = '<table cellspacing="0" cellpadding="0" style="border-collapse'
16n/a starttag.match(foo)