]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/recursion_limit_too_high.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / crashers / recursion_limit_too_high.py
CommitLineData
4710c53d 1# The following example may crash or not depending on the platform.\r
2# E.g. on 32-bit Intel Linux in a "standard" configuration it seems to\r
3# crash on Python 2.5 (but not 2.4 nor 2.3). On Windows the import\r
4# eventually fails to find the module, possibly because we run out of\r
5# file handles.\r
6\r
7# The point of this example is to show that sys.setrecursionlimit() is a\r
8# hack, and not a robust solution. This example simply exercises a path\r
9# where it takes many C-level recursions, consuming a lot of stack\r
10# space, for each Python-level recursion. So 1000 times this amount of\r
11# stack space may be too much for standard platforms already.\r
12\r
13import sys\r
14if 'recursion_limit_too_high' in sys.modules:\r
15 del sys.modules['recursion_limit_too_high']\r
16import recursion_limit_too_high\r