Commits

Barry Warsaw committed 4c69ec7

Backport fix from default branch for ./python -R -Wd where hash('d') would not
have gotten randomized.

  • Participants
  • Parent commits 04738f3
  • Branches 2.6

Comments (0)

Files changed (1)

 
         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':