| 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.
|
| | |
|
| |
|
|
|
|
|
|
| |
In cyclic gc, clear all weakrefs to unreachable objects before allowing any
Python code (weakref callbacks or __del__ methods) to run.
This is a critical bugfix, affecting all versions of Python since weakrefs
were introduced.
|
| | |
|
| |
|
|
|
| |
possible that the callback-less flavors of the ref or proxy could have
been added during GC, so we don't want to replace them.
|
| | |
|
| |
|
|
|
| |
Fix for bug #966623 - classes created with type() in an exec(, {}) don't
have a __module__. Test for this case.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
If a file is opened with an explicit buffer size >= 1, repeated
close() calls would attempt to free() the buffer already free()ed on
the first close(). [bug introduced with patch #788249]
Making sure that the buffer is free()ed in file object deallocation is
a belt-n-braces bit of insurance against a memory leak.
|
| |
|
|
| |
(Backport to 2.3 maintenance branch)
|
| | |
|
| |
|
|
|
|
| |
is a tuple nested to a depth beyond the interpreter's recursion limit to
prevent a segfault from blowing the C stack.
Fixes bug #858016 .
|
| |
|
|
| |
Py_USING_UNICODE is defined
|
| |
|
|
|
| |
2. Failure to clear the error when attempts to get the __getstate__
attribute fail caused intermittent errors and odd behavior.
|
| |
|
|
|
|
|
| |
(Contributed by Mike Pall.)
Make sure fill_free_list() is called only once rather than 106 times
when pre-allocating small ints.
|
| |
|
|
|
| |
Fix reallocation bug in unicode.translate(): The code was comparing
characters instead of character pointers to determine space requirements.
|
| |
|
|
|
|
|
|
|
| |
the same object to be collected by the cyclic GC support if they are
only referenced by a cycle. If the weakref being collected was one of
the weakrefs without callbacks, some local variables for the
constructor became invalid and have to be re-computed.
The test caused a segfault under a debug build without the fix applied.
|
| |
|
|
|
| |
weakref ref and proxy objects; None was not being treated as identical to
NULL, though it was documented as equivalent.
|
| |
|
|
|
|
|
|
| |
Also SF patch 843455.
This is a critical bugfix, backported from 2.4 development.
I don't intend to backport beyond 2.3 maint. The bugs this fixes
have been there since weakrefs were introduced.
|
| |
|
|
|
|
|
|
| |
expanded the test case with a piece that needs the more-complete fix.
I don't intend to backport this beyond 2.3 maint. It's a critical
bugfix, and should be backported to 2.2, 2.1, ..., if more releases in
those lines get made.
|
| |
|
|
|
|
|
|
| |
weakref callbacks.
This is a critical bugfix. It's already been fixed on the trunk (2.4
development). I don't intend to backport it to the 22 line, but if a
2.2.4 ever gets released, this should be in it.
|
| |
|
|
|
|
|
|
| |
Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().
charmaptranslate_makespace() allocates more memory than required for the
next replacement but didn't remember that fact, so memory size was growing
exponentially every time a replacement string is longer that one character.
This fixes SF bug #828737.
|
| |
|
|
| |
This closes SF bug #827260.
|
| | |
|
| |
|
|
|
| |
Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751)
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
of 1 or 0.
Backport Guido's fix to the default __contains__() and to proxy_has_key()
so they will properly return booleans instead of integers.
|
| | |
|
| | |
|
| |
|
|
|
| |
hashing a class that does not define __hash__ but does define a
comparison.
|
| | |
|
| | |
|
| |
|
|
| |
slice(5).__hash__() now raises a TypeError.
|
| |
|
|
| |
Fixes #603724.
|
| |
|
|
| |
(Contributed by George Yoshida.)
|
| | |
|
| |
|
|
| |
Added missing support for '%F' as had been documented.
|
| |
|
|
| |
Fix refcounting leak in charmaptranslate_lookup()
|
| |
|
|
| |
Fix another refcounting leak in PyUnicode_EncodeCharmap().
|
| |
|
|
| |
Fix another refcounting leak (in PyUnicode_DecodeUnicodeEscape()).
|
| |
|
|
|
| |
My last fix left n used unitialized in tha a==b case.
Fix, by not using n at all in that case.
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix refcount leak in PyUnicode_EncodeCharmap(). The bug surfaces
when an encoding error occurs and the callback name is unknown,
i.e. when the callback has to be called. The problem was that
the fact that the callback has already been looked up was only
recorded in a local variable in charmap_encoding_error(), because
charmap_encoding_error() got it's own copy of the errorHandler
pointer instead of a pointer to the pointer in
PyUnicode_EncodeCharmap().
|
| |
|
|
|
| |
Fix reference leak noted in test_types:
Check for a[:] = a _before_ calling PySequence_Fast on a.
|
| |
|
|
|
|
| |
just do the backport.
These changes do not apply to release22-maint.
|
| |
|
|
| |
module had been compiled. It gives too many spurious warnings.
|
| | |
|