diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-02-21 05:40:14 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-02-21 05:40:14 (GMT) |
commit | 9be6c3ddf09ce4bc5768f708867e6b30a5bc78cb (patch) | |
tree | 1f10b15d2fb6ae1e696505e1f443717fde452410 /Modules | |
parent | c7bbd7be945998f4471b95a5c0f54af75dfb922c (diff) | |
download | cpython-9be6c3ddf09ce4bc5768f708867e6b30a5bc78cb.zip cpython-9be6c3ddf09ce4bc5768f708867e6b30a5bc78cb.tar.gz cpython-9be6c3ddf09ce4bc5768f708867e6b30a5bc78cb.tar.bz2 |
kill interned strings computed before random initialization
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c index 6d1ae9e..824bada 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -397,6 +397,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': |