]> granicus.if.org Git - python/commitdiff
Issue #15001: fix segfault on "del sys.module['__main__']"
authorHynek Schlawack <hs@ox.cx>
Wed, 7 Nov 2012 08:07:22 +0000 (09:07 +0100)
committerHynek Schlawack <hs@ox.cx>
Wed, 7 Nov 2012 08:07:22 +0000 (09:07 +0100)
Patch by Victor Stinner.

1  2 
Lib/test/test_cmd_line.py
Misc/NEWS
Python/pythonrun.c

Simple merge
diff --cc Misc/NEWS
index 63baa0d0f95bb64b7367d17dc3b3a543fb57d7ae,6901beccf550ad7d0adf044083d7387b0a5b8641..2f2ed8967c1e435becd8c5574957ef7513587bc1
+++ b/Misc/NEWS
@@@ -12,12 -10,12 +12,15 @@@ What's New in Python 3.3.1
  Core and Builtins
  -----------------
  
 -- Issue #5057: the peepholer no longer optimizes subscription on unicode
 -  literals (e.g. u'foo'[0]) in order to produce compatible pyc files between
 -  narrow and wide builds.
+ - Issue #15001: fix segfault on "del sys.module['__main__']". Patch by Victor
+   Stinner.
 +- Issue #8271: the utf-8 decoder now outputs the correct number of U+FFFD
 +  characters when used with the 'replace' error handler on invalid utf-8
 +  sequences.  Patch by Serhiy Storchaka, tests by Ezio Melotti.
 +
 +- Issue #5765: Apply a hard recursion limit in the compiler instead of
 +  blowing the stack and segfaulting. Initial patch by Andrea Griffini.
  
  - Issue #16402: When slicing a range, fix shadowing of exceptions from
    __index__.
index 7c4fb4a3c9a64a68c32f71e6f3e46051520810cd,3639fa7e22610f1284974976aee0cf270c22d4ff..dd3201757410c92d599d9e5676e04668815e41fc
@@@ -1420,9 -1287,8 +1421,8 @@@ PyRun_SimpleFileExFlags(FILE *fp, cons
          /* Try to run a pyc file. First, re-open in binary */
          if (closeit)
              fclose(fp);
 -        if ((fp = fopen(filename, "rb")) == NULL) {
 +        if ((pyc_fp = fopen(filename, "rb")) == NULL) {
              fprintf(stderr, "python: Can't reopen .pyc file\n");
-             ret = -1;
              goto done;
          }
          /* Turn on optimization if a .pyo file is given */