]> granicus.if.org Git - python/commit
Issue2297: Fix a stack overflow in Windows caused by -v and -vv. When python is...
authorTrent Nelson <trent.nelson@snakebite.org>
Wed, 19 Mar 2008 06:45:48 +0000 (06:45 +0000)
committerTrent Nelson <trent.nelson@snakebite.org>
Wed, 19 Mar 2008 06:45:48 +0000 (06:45 +0000)
commit39e307e224bae1e1bb0e236aba5e76515d220eec
treeff516404a0ed4fbc01f91b96201aa18fb5eafcf8
parent8a5f8ca33b56db9af973d1f34a9b3df5271b56c0
Issue2297: Fix a stack overflow in Windows caused by -v and -vv.  When python is invoked with -v or -vv under Windows, the process of importing the codec for sys.stderr causes a message to be written to stderr, which in turn causes the codec to be recursively imported.  Sometimes the stack overflow exception is swallowed, other times it is not.  The bug depends on the particular locale settings of the Windows machine.

Kudos to Douglas Greiman for reporting the issue and providing a patch and test case.
Lib/test/test_cmd_line.py
Python/pythonrun.c