summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-02-21 11:23:21 -0500
committerBenjamin Peterson <benjamin@python.org>2012-02-21 11:23:21 -0500
commit876e789f650a68b1fe05be7060794357cf13e3d3 (patch)
tree147ab9d1819980623e60b5d828a2eeadbf089564
parent26da920001941b0cd74981772924a6aab4d2881a (diff)
parent8757cad394ff09bfd600e38390cacc7ce48a8773 (diff)
downloadcpython-git-876e789f650a68b1fe05be7060794357cf13e3d3.tar.gz
merge heads
-rw-r--r--Modules/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c
index a57d00b359..780d877b51 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -396,6 +396,12 @@ Py_Main(int argc, char **argv)
case 'W':
PySys_AddWarnOption(_PyOS_optarg);
+ /* Extremely obscure hack: if _PyOS_optarg was one character,
+ PyString_FromString in PySys_AddWarnOption will try to intern
+ it. This is bad because hash randomization has not been setup
+ yet, so the string will get the wrong hash. The following call
+ will cause all the cached characters to be released. */
+ PyString_Fini();
break;
case 'R':