summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-25083: Python can sometimes create incorrect .pyc files (GH-8449)tzickel2018-09-101-0/+3
| | | | | | Python 2 never checked for I/O error when reading .py files and thus could mistake an I/O error for EOF and create incorrect .pyc files. This adds an check for this and aborts on an error.
* [2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)Serhiy Storchaka2018-07-311-1/+1
|
* bpo-34080: Fix a memory leak in the compiler. (GH-8222)Miss Islington (bot)2018-07-111-1/+1
| | | | | (cherry picked from commit 993030aac576710a46b3dd0b4864f819d4a94145) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [2.7] bpo-31692: Add PYTHONSHOWALLOCCOUNT env var (GH-3927)Victor Stinner2017-10-171-1/+3
| | | | | | | | | | | | | | | | bpo-31692, bpo-19527: * Add a new PYTHONSHOWALLOCCOUNT environment variable, similar to the Python 3 "-X showalloccount" option * When Python is compiled with COUNT_ALLOCS, the new PYTHONSHOWALLOCCOUNT environment variable now has to be set to dump allocation counts into stderr on shutdown. Moreover, allocations statistics are now dumped into stderr rather than stdout. * Add @test.support.requires_type_collecting decorator: skip test if COUNT_ALLOCS is defined * Fix tests for COUNT_ALLOCS: decorate some methods with @requires_type_collecting * test_sys.test_objecttypes(): update object type when COUNT_ALLOCS is defined
* bpo-31733: Add PYTHONSHOWREFCOUNT env var (GH-3932)Victor Stinner2017-10-171-10/+17
| | | | | Add a new PYTHONSHOWREFCOUNT environment variable. In debug mode, Python now only print the total reference count if PYTHONSHOWREFCOUNT is set.
* Issue #14376: sys.exit now accepts longs as well as ints. Thanks Gareth Rees.Mark Dickinson2017-02-021-1/+1
|
* Issue #27076: Doc, comment and test function name spelling fixesMartin Panter2016-05-261-1/+1
| | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* Issue #22836: Keep exception reports sensible despite errorsMartin Panter2016-02-281-1/+7
|
* Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-22/+21
| | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
* Issue #21963: backout issue #1856 patch (avoid crashes and lockups whenAntoine Pitrou2014-11-211-8/+1
| | | | | | daemon threads run while the interpreter is shutting down; instead, these threads are now killed when they try to take the GIL), as it seems to break some existing code.
* PEP 466: backport persistent urandom fd (closes #21305)Benjamin Peterson2014-08-281-0/+1
| | | | Patch from Alex Gaynor.
* avoid crashes and lockups from daemon threads during interpreter shutdown ↵Benjamin Peterson2014-06-171-1/+8
| | | | (#1856)
* Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in theChristian Heimes2013-10-221-0/+5
| | | | Python executable and not removed by the linker's optimizer.
* Issue #15001: fix segfault on "del sys.modules['__main__']"Hynek Schlawack2012-11-071-5/+5
| | | | Patch by Victor Stinner.
* fix parse_syntax_error to clean up its resourcesBenjamin Peterson2012-04-031-19/+31
|
* Fix crash at startup with -W options.Antoine Pitrou2012-02-211-1/+0
|
* merge 2.6 with hash randomization fixBenjamin Peterson2012-02-211-0/+8
|\
| * - Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEEDBarry Warsaw2012-02-211-0/+8
| | | | | | | | | | | | environment variable, to provide an opt-in way to protect against denial of service attacks due to hash collisions within the dict and set types. Patch by David Malcolm, based on work by Victor Stinner.
| * Merged revisions 81537 via svnmerge fromVictor Stinner2010-05-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81537 | victor.stinner | 2010-05-26 00:30:32 +0200 (mer., 26 mai 2010) | 3 lines Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding and error handler, instead of writing to the C stderr file in utf-8 ........
| * Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1332/+1332
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
| * Merged revisions 81007 via svnmerge fromJean-Paul Calderone2010-05-081-0/+4
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81007 | jean-paul.calderone | 2010-05-08 16:06:02 -0400 (Sat, 08 May 2010) | 1 line Skip signal handler re-installation if it is not necessary. Issue 8354. ........
| * Partial backport of r78826: leave import site error handler unchanged (printVictor Stinner2010-03-211-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the error and continue). Merged revisions 78826-78827 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78826 | victor.stinner | 2010-03-10 23:30:19 +0100 (mer., 10 mars 2010) | 5 lines Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt (SIGINT). If an error occurs while importing the site module, the error is printed and Python exits. Initialize the GIL before importing the site module. ........ r78827 | victor.stinner | 2010-03-10 23:45:04 +0100 (mer., 10 mars 2010) | 4 lines ooops, fix error message in execusercustomize() Copy/paste failure :-) ........
| * Merged revisions 75570,75574,75624 via svnmerge fromAntoine Pitrou2009-10-271-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75570 | antoine.pitrou | 2009-10-20 23:29:37 +0200 (mar., 20 oct. 2009) | 6 lines Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which fixes the problem of some exceptions being thrown at shutdown when the interpreter is killed. Patch by Adam Olsen. ........ r75574 | antoine.pitrou | 2009-10-20 23:59:25 +0200 (mar., 20 oct. 2009) | 4 lines Test wouldn't work in debug mode. We probably need a function in test_support to handle this. ........ r75624 | antoine.pitrou | 2009-10-23 14:01:13 +0200 (ven., 23 oct. 2009) | 3 lines Fix Windows buildbot failure ........
| * Merged revisions 71152 via svnmerge fromMatthias Klose2009-04-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71152 | matthias.klose | 2009-04-04 16:18:13 +0200 (Sa, 04 Apr 2009) | 3 lines - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with short file names. ........
| * Merged revisions 70908 via svnmerge fromJesse Noller2009-03-311-0/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70908 | jesse.noller | 2009-03-31 17:20:35 -0500 (Tue, 31 Mar 2009) | 1 line Issue 5619: Pass MS CRT debug flags into subprocesses ........
| * Merged revisions ↵Georg Brandl2009-01-031-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line fill in actual issue number in tests ........ r68134 | hirokazu.yamamoto | 2009-01-01 16:45:39 +0100 (Thu, 01 Jan 2009) | 2 lines Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open file with `str' filename on Windows. ........ r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line fix highlighting ........ r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines welcome to 2009, Python! ........ r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines #4801 _collections module fails to build on cygwin. _PyObject_GC_TRACK is the macro version of PyObject_GC_Track, and according to documentation it should not be used for extension modules. ........ r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue4472: "configure --enable-shared doesn't work on OSX" ........ r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines Forgot to add a NEWS item in my previous checkin ........ r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue4780 ........ r68159 | ronald.oussoren | 2009-01-02 15:48:17 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue 1627952 ........ r68160 | ronald.oussoren | 2009-01-02 15:52:09 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue r1737832 ........ r68161 | ronald.oussoren | 2009-01-02 16:00:05 +0100 (Fri, 02 Jan 2009) | 3 lines Fix for issue 1149804 ........ r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines Fix for issue 4472 is incompatible with Cygwin, this patch should fix that. ........ r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line document PyMemberDef ........ r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines #4811: fix markup glitches (mostly remains of the conversion), found by Gabriel Genellina. ........ r68172 | martin.v.loewis | 2009-01-02 21:32:55 +0100 (Fri, 02 Jan 2009) | 2 lines Issue #4075: Use OutputDebugStringW in Py_FatalError. ........ r68173 | martin.v.loewis | 2009-01-02 21:40:14 +0100 (Fri, 02 Jan 2009) | 2 lines Issue #4051: Prevent conflict of UNICODE macros in cPickle. ........ r68174 | benjamin.peterson | 2009-01-02 21:47:27 +0100 (Fri, 02 Jan 2009) | 1 line fix compilation on non-Windows platforms ........ r68179 | raymond.hettinger | 2009-01-02 22:26:45 +0100 (Fri, 02 Jan 2009) | 1 line Issue #4615. Document how to use itertools for de-duping. ........ r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines Remove useless string literal. ........ r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines Fix indentation. ........ r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines Set eol-style correctly for mp_distributing.py. ........ r68214 | georg.brandl | 2009-01-03 20:44:48 +0100 (Sat, 03 Jan 2009) | 2 lines Make indentation consistent. ........ r68215 | georg.brandl | 2009-01-03 21:15:14 +0100 (Sat, 03 Jan 2009) | 2 lines Fix role name. ........ r68217 | georg.brandl | 2009-01-03 21:30:15 +0100 (Sat, 03 Jan 2009) | 2 lines Add rstlint, a little tool to find subtle markup problems and inconsistencies in the Doc sources. ........ r68218 | georg.brandl | 2009-01-03 21:38:59 +0100 (Sat, 03 Jan 2009) | 2 lines Recognize usage of the default role. ........ r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines Fix uses of the default role. ........ r68220 | georg.brandl | 2009-01-03 21:55:06 +0100 (Sat, 03 Jan 2009) | 2 lines Remove trailing whitespace. ........ r68221 | georg.brandl | 2009-01-03 22:04:55 +0100 (Sat, 03 Jan 2009) | 2 lines Remove tabs from the documentation. ........ r68222 | georg.brandl | 2009-01-03 22:11:58 +0100 (Sat, 03 Jan 2009) | 2 lines Disable the line length checker by default. ........
| * Merged revisions 67343 via svnmerge fromAmaury Forgeot d'Arc2008-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67343 | amaury.forgeotdarc | 2008-11-22 21:01:18 +0100 (sam., 22 nov. 2008) | 5 lines #3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from stack overflow. But doing this, it always crashes when the stack is nearly full. Reviewed by Martin von Loewis. Will backport to 2.6. ........
| * Merged revisions 67066 via svnmerge fromBenjamin Peterson2008-10-311-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67066 | benjamin.peterson | 2008-10-30 21:16:05 -0500 (Thu, 30 Oct 2008) | 5 lines make sure the parser flags and passed onto the compiler This fixes "from __future__ import unicode_literals" in an exec statment See #4225 ........
* | Port #6498 fix: fix several misspellings of "SystemExit" as "SystemError".Georg Brandl2011-05-151-1/+1
| |
* | Merged revisions 85904 via svnmerge fromBenjamin Peterson2010-10-291-0/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85904 | benjamin.peterson | 2010-10-28 22:28:14 -0500 (Thu, 28 Oct 2010) | 1 line decrement offset when it points to a newline (#10186 followup) ........
* | Merged revisions 85814 via svnmerge fromBenjamin Peterson2010-10-241-2/+0
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85814 | benjamin.peterson | 2010-10-23 21:52:05 -0500 (Sat, 23 Oct 2010) | 1 line remove broken code accounting an offset the size of the line #10186 ........
* | sys.stderr and sys.excepthook can be None at interpreter shutdown,Antoine Pitrou2010-08-081-2/+2
| | | | | | | | | | in which case display the appropriate error message. (part of #5319)
* | Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding andVictor Stinner2010-05-251-1/+7
| | | | | | | | error handler, instead of writing to the C stderr file in utf-8
* | Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-1325/+1325
| |
* | Skip signal handler re-installation if it is not necessary. Issue 8354.Jean-Paul Calderone2010-05-081-0/+4
| |
* | Change to a Py_XDECREF and fix some whitespace.Brett Cannon2010-05-051-8/+8
| | | | | | | | Found using Clang's static analyzer.
* | Issue #3137: Don't ignore errors at startup, especially a keyboard interruptVictor Stinner2010-03-101-16/+16
| | | | | | | | | | | | (SIGINT). If an error occurs while importing the site module, the error is printed and Python exits. Initialize the GIL before importing the site module.
* | Issue #1722344: threading._shutdown() is now called in Py_Finalize(), whichAntoine Pitrou2009-10-201-0/+30
| | | | | | | | | | fixes the problem of some exceptions being thrown at shutdown when the interpreter is killed. Patch by Adam Olsen.
* | - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access withMatthias Klose2009-04-041-2/+3
| | | | | | | | short file names.
* | Issue 5619: Pass MS CRT debug flags into subprocessesJesse Noller2009-03-311-0/+2
| |
* | Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.Mark Dickinson2009-03-201-0/+3
| | | | | | | | Backport of r70459.
* | fix compilation on non-Windows platformsBenjamin Peterson2009-01-021-0/+2
| |
* | Issue #4075: Use OutputDebugStringW in Py_FatalError.Martin v. Löwis2009-01-021-3/+17
| |
* | #3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter fromAmaury Forgeot d'Arc2008-11-221-1/+1
| | | | | | | | | | | | stack overflow. But doing this, it always crashes when the stack is nearly full. Reviewed by Martin von Loewis. Will backport to 2.6.
* | make sure the parser flags and passed onto the compilerBenjamin Peterson2008-10-311-6/+12
|/ | | | | This fixes "from __future__ import unicode_literals" in an exec statment See #4225
* Fix:Neal Norwitz2008-08-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * crashes on memory allocation failure found with failmalloc * memory leaks found with valgrind * compiler warnings in opt mode which would lead to invalid memory reads * problem using wrong name in decimal module reported by pychecker Update the valgrind suppressions file with new leaks that are small/one-time leaks we don't care about (ie, they are too hard to fix). TBR=barry TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes) in opt mode: valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \ -x test_logging test_ssl test_multiprocessing valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py test_multiprocessing for i in `seq 1 4000` ; do LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \ ./python -c pass done At least some of these fixes should probably be backported to 2.5.
* #3378: in case of no memory, don't leak even more memory. :)Georg Brandl2008-07-191-6/+7
|
* Fix tabs.Georg Brandl2008-07-051-12/+12
|
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-14/+14
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Typo: encoding -> codeset.Martin v. Löwis2008-06-011-1/+1
|