| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Repair so that it's back to how it was in 2.4.3.
Needs to be forward-ported to 2.5 branch and trunk.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
_bsddb on Windows (Martin recently repaired that -- thanks!).
|
| |
|
|
|
|
| |
#1494314: Fix a regression with high-numbered sockets in 2.4.3. This
means that select() on sockets > FD_SETSIZE (typically 1024) work again.
The patch makes sockets use poll() internally where available.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
about truly wrong code.
Checkin comment from 51262:
Can't return NULL from a void function. If there is a memory error,
about the best we can do is call PyErr_WriteUnraisable and go on.
We won't be able to do the call below either, so verify delstr is valid.
|
| |
|
|
|
|
|
|
|
|
| |
Windows builbot's "build" step to the start of its "test"
step.
This is poke-and-hope. The hope is that compilation failures
on Windows will become visible to the buildbot (bsddb has
apparently been failing to compile in 2.4 on Windows "for
some time" now, but the buildbots haven't noticed that).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
fixing an unlikely crash bug in dict resizing, SF
bug 1456209.
The rest of rev 46589 changes whether Python suppresses
exceptions during some dict-related comparisons. While I
think that's a good idea, it does change visible behavior at
times, and there was already some complaining about that on
the trunk. Not a good idea for backporting. The part of
46589 checked in here can at worst stop segfaults, and I doubt
anyone will gripe about that ;-)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- reset errno before calling confstr - use confstr() doc to simplify
checks afterwards
- Correct implementation and documentation of os.confstr. Add a simple
test case. I've yet to figure out how to provoke a None return I can test.
- Address issues brought up by MvL on python-checkins.
I tested this with valgrind on amd64.
The man pages I found for diff architectures are inconsistent on this.
I'm not entirely sure this change is correct for all architectures
either.
Perhaps we should just over-allocate and not worry about it?
The change to return None instead of "" in case of unconfigured
values has not been backported.
|
| |
|
|
|
|
|
|
|
|
| |
Fix problems found by Coverity.
longobject.c: also fix an ssize_t problem
<a> could have been NULL, so hoist the size calc to not use <a>.
[The ssize_t change isn't needed for 2.4. The other changes in this revision
are to modules not present in 2.4. --amk]
|
| |
|
|
|
|
|
|
|
|
| |
Fix problems found by Coverity.
_ssl.c: under fail: self is DECREF'd, but it would have been NULL.
_csv.c: I'm not sure if lineterminator could have been anything other than
a string. However, other string method calls are checked, so check this
one too.
|
| |
|
|
|
|
|
|
|
| |
Fix three nits found by Coverity, adding null checks and comments.
[This commit only makes two changes. One change in the original patch
is just adding a comment, and another adds a 'base != NULL' check to
silence Coverity, but a comment adds that that base is never going to
be NULL. I didn't backport that change. --amk]
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
the need for the out-of-tree universal binary support that was used to build
the 2.4.3 installer.
Missing here relative to that tree are some changes to IDLE, IMHO those patches
aren't appropriate for the 2.4 branch and users are better of using 2.5's IDLE.
|
| |
|
|
| |
Modules".
|
| |
|
|
|
| |
Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters. (Submitted by Ray Chason)
|
| |
|
|
|
|
| |
Remove dead code (reported by HP compiler).
Can probably be backported if anyone cares.
|
| |
|
|
|
| |
Fix #132 from Coverity, retval could have been derefed
if a continue inside a try failed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Patch #1357836:
Prevent an invalid memory read from test_coding in case the done flag is set.
In that case, the loop isn't entered. I wonder if rather than setting
the done flag in the cases before the loop, if they should just exit early.
This code looks like it should be refactored.
Backport candidate (also the early break above if decoding_fgets fails)
|
| | |
|
| | |
|
| |
|
|
| |
- remove Sleepycat name now that they have been bought
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
backported.]
Use sizeof(buffer) instead of duplicating the constants to ensure they won't
be wrong.
The real change is to pass (bufsz - 1) to PyOS_ascii_formatd and 1
to strncat. strncat copies n+1 bytes from src (not dest).
Reported by Klocwork #58.
|
| |
|
|
|
|
|
| |
PyFunction_SetDefaults() is documented as taking None or a tuple.
A NULL would crash the PyTuple_Check(). Now make NULL return a SystemError.
Reported by Klocwork #73.
|
| |
|
|
|
|
|
|
|
|
|
| |
you find that Python does print "MemoryError". There's no traceback
and no indication of which line of code is responsible, but it's
better than a segfault.]
Handle NULL nodes while parsing. I'm not entirely sure this is correct.
There might be something else that needs to be done to setup the error.
Klocwork #295.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Handle a whole lot of failures from PyString_FromInternedString().
Should fix most of Klocwork 234-272.
[Backport r51400 | neal.norwitz]
Move initialization of interned strings to before allocating the
object so we don't leak op. (Fixes an earlier patch to this code)
Klockwork #350
|
| |
|
|
|
|
|
|
|
|
|
|
| |
this code is only used if WITHOUT_COMPLEX is *not* defined, which is the
common case for Python builds.]
This code is actually not used unless WITHOUT_COMPLEX is defined.
However, there was no error checking that PyFloat_FromDouble returned
a valid pointer. I believe this change is correct as it seemed
to follow other code in the area.
Klocwork # 292.
|
| |
|
|
|
|
|
| |
It's highly unlikely, though possible for PyEval_Get*() to return NULLs.
So be safe and do an XINCREF.
Klocwork # 221-222.
|
| |
|
|
|
|
|
|
| |
Reported by Klocwork #151.
v2 can be NULL if exception2 is NULL. I don't think that condition can happen,
but I'm not sure it can't either. Now the code will protect against either
being NULL.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
but looks correct on a casual inspection and hasn't been modified
in the trunk. Does anyone want to review further?]
Ensure we don't write beyond errText. I think I got this right, but
it definitely could use some review to ensure I'm not off by one
and there's no possible overflow/wrap-around of bytes_left.
Reported by Klocwork #1.
Fix a problem if there is a failure allocating self->db.
Found with failmalloc.
|
| |
|
|
|
|
|
|
|
| |
and _elementtree.c weren't applicable]
Klocwork made another run and found a bunch more problems.
This is the first batch of fixes that should be easy to verify based on context.
This fixes problem numbers: 220 (ast), 323-324 (symtable),
321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
|
| |
|
|
|
|
| |
applied to pyarena.c, compile.c, and symtable.c, which were different in 2.4.]
Fix more memory allocation issues found with failmalloc.
|
| |
|
|
|
| |
Handle allocation failures gracefully. Found with failmalloc.
Many (all?) of these could be backported.
|
| |
|
|
|
|
| |
Cause a PyObject_Malloc() failure to trigger a MemoryError, and then
add 'if (PyErr_Occurred())' checks to various places so that NULL is
returned properly.
|
| |
|
|
|
|
|
|
| |
If _stat_float_times is false, we will try to INCREF ival which could be NULL.
Return early in that case. The caller checks for PyErr_Occurred so this
should be ok.
Klocwork #297
|
| |
|
|
|
| |
Move the assert which checks for a NULL pointer first.
Klocwork #274.
|
| |
|
|
|
|
|
|
|
| |
cpathname could be NULL if it was longer than MAXPATHLEN. Don't try
to write the .pyc to NULL.
Check results of PyList_GetItem() and PyModule_GetDict() are not NULL.
Klocwork 282, 283, 285
|
| |
|
|
|
|
|
| |
Fix segfault when doing string formatting on subclasses of long if
__oct__, __hex__ don't return a string.
Klocwork 308
|