| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- Bug #875692: Improve signal handling, especially when using threads, by
forcing an early re-execution of PyEval_EvalFrame() "periodic" code when
things_to_do is not cleared by Py_MakePendingCalls().
|
|
|
|
|
|
|
| |
* using malloc() and free() directly, as explained in the new comment
* coding style in the PyGILState_*() functions
* the recent destroy-tstate-without-holding-the-GIL bug
* lock fixes and many more comments in thread.c
|
|
|
|
| |
(Backport to 2.3 maintenance branch.)
|
| |
|
|
|
|
| |
big code objects (>64K) may be optimized incorrectly
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
table' of the dll, to make sure that the dll really was build for the
correct Python version. It does this by looking for an entry
'pythonXY.dll' (X.Y is the Python version number).
The code now checks the size of the dll's import table before reading
entries from it. Before this patch, the code crashed trying to read
the import table when the size was zero (as in Win2k's wmi.dll, for
example).
Look for imports of 'pythonXY_d.dll' in a debug build instead of
'pythonXY.dll'.
Fixes SF 951851: Crash when reading "import table" of certain windows dlls.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
remain deprecated in the documentation.
|
|
|
|
|
|
|
| |
comments about why both calls to cyclic gc here can cause problems.
Already fixed on the trunk. Since the calls were introduced in 2.3,
that's the end of it.
|
| |
|
|
|
|
| |
alone, because there can be no guarantee re the semantics of += vs + .
|
|
|
|
| |
fixes performance bug with sum(lotsoflists, []).
|
|
|
|
|
| |
Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751)
|
| |
|
| |
|
| |
|
|
|
|
| |
interpreters. Fixes #698282.
|
|
|
|
|
|
|
| |
Fix a crash: when sq_item failed the code continued blindly and used the
NULL pointer. (Detected by Michael Hudson, patch provided by Neal Norwitz).
Fix refcounting leak in filtertuple().
|
|
|
|
|
|
| |
Fix refcount leak in the UnicodeError constructor:
When parsing the constructor arguments failed, a
reference to the argument tuple was leaked.
|
|
|
|
|
|
|
|
| |
* Enhance message for UnicodeEncodeError and UnicodeTranslateError.
If there is only one bad character it will now be printed in a
form that is a valid Python string.
* Add a unicode prefix to the characters in the UnicodeEncodeError
and UnicodeTranslateError message.
|
| |
|
|
|
|
| |
Verify that the encoding actually exists. Fixes #775985.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cygwin's pthread_sigmask() implementation appears to be buggy. This
patch works around this problem by using sigprocmask() instead.
This patch is implemented in a general way so it could be used by other
platforms too. If this approach is deemed too risky, then I can work up
a patch that just hacks Python/thread_pthread.h for Cygwin.
Note that I tested this patch against 2.3c1 under Red Hat Linux 8.0 too.
[snip]
And finally, I need someone to regenerate pyconfig.h.in and configure
with the same versions of the autotools that are normally used by
Python.
Neal kindly regenerated pyconfig.h.in and configure for me.
|
|
|
|
| |
sys.__modules__.
|
|
|
|
|
|
| |
If the initial import of warnings fails, clear the error. When the module
is actually needed, if the original import failed, see if it has managed
to find its way to sys.modules yet and if so, remember it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes for three related bugs, including errors that caused a script to
be ignored without printing an error message. The key problem was a bad
interaction between syntax warnings and syntax errors. If an
exception was already set when a warning was issued, the warning could
clobber the exception.
The PyErr_Occurred() check in issue_warning() isn't entirely
satisfying (the caller should know whether there was already an
error), but a better solution isn't immediately obvious.
Bug fix candidate.
|
| |
|
|
|
|
|
| |
- there's a weird variable name here (zimpimport), but I'll leave that
for someone that's familiar with the ZIP import support
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
behavior, creating many threads very quickly. A long debugging session
revealed that the Windows implementation of PyThread_start_new_thread()
was choked with "laziness" errors:
1. It checked MS _beginthread() for a failure return, but when that
happened it returned heap trash as the function result, instead of
an id of -1 (the proper error-return value).
2. It didn't consider that the Win32 CreateSemaphore() can fail.
3. When creating a great many threads very quickly, it's quite possible
that any particular bootstrap call can take virtually any amount of
time to return. But the code waited for a maximum of 5 seconds, and
didn't check to see whether the semaphore it was waiting for got
signaled. If it in fact timed out, the function could again return
heap trash as the function result. This is actually what confused
the test program, as the heap trash usually turned out to be 0, and
then multiple threads all got id 0 simultaneously, confusing the
hell out of threading.py's _active dict (mapping id to thread
object). A variety of baffling behaviors followed from that.
WRT #1 and #2, error returns are checked now, and "thread.error: can't
start new thread" gets raised now if a new thread (or new semaphore)
can't be created. WRT #3, we now wait for the semaphore without a
timeout.
Also removed useless local vrbls, folded long lines, and changed callobj
to a stack auto (it was going thru malloc/free instead, for no discernible
reason).
Bugfix candidate.
|
|
|
|
| |
Will backport.
|
|
|
|
|
|
|
|
|
| |
A new API (only accessible from C) to interrupt a thread by sending it
an exception. This is not always effective, but might help some people.
Requested by Just van Rossum and Alex Martelli. It is intentional
that you have to write your own C extension to call it from Python.
Docs will have to wait.
|
| |
|
|
|
|
|
|
|
| |
It depended on the previously removed basic block checker to
prevent a jump into the middle of the transformed block.
Clears SF 757818: tuple assignment -- SystemError: unknown opcode
|
|
|
|
|
|
| |
operate on the module dictionary directly. This prevents spurious
depreciation warnings from being raised if a submodule name shadows
a builtin name.
|
|
|
|
| |
gives a small speedup).
|
|
|
|
|
| |
The fast_function() inlining optimization only
applies when there are zero keyword arguments.
|
|
|
|
| |
reported by Kurt B. Kaiser.
|