| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
Fixes #1591996. Patch contributed by Neal Norwitz.
Will backport.
|
| |
|
|
|
|
| |
the tuple isn't used as the "exception arguments tuple".
|
|
|
|
| |
Will backport.
|
|
|
|
| |
Will backport.
|
|
|
|
|
|
| |
loops are, um, infinite. These conditions should not be able to happen.
Will backport.
|
|
|
|
|
|
|
| |
not the posix error code; with test.
Fixes #1576174.
Will backport to release25-maint.
|
|
|
|
| |
embedded in the string to convert.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* unified the way intobject, longobject and mystrtoul handle
values around -sys.maxint-1.
* in general, trying to entierely avoid overflows in any computation
involving signed ints or longs is extremely involved. Fixed a few
simple cases where a compiler might be too clever (but that's all
guesswork).
* more overflow checks against bad data in marshal.c.
* 2.5 specific: fixed a number of places that were still confusing int
and Py_ssize_t. Some of them could potentially have caused
"real-world" breakage.
* list.pop(x): fixing overflow issues on x was messy. I just reverted
to PyArg_ParseTuple("n"), which does the right thing. (An obscure
test was trying to give a Decimal to list.pop()... doesn't make
sense any more IMHO)
* trying to write a few tests...
|
|
|
|
|
| |
on undefined behaviour of the C compiler anymore.
Will backport to 2.5 and 2.4.
|
|
|
|
| |
number of arguments, as was the case in Python 2.4.
|
|
|
|
|
| |
keyword arguments any more (previously they accepted them, but didn't
use them).
|
|
|
|
|
|
|
| |
(e.g., ``BaseException(1,2,3)[0:2]``).
Discovered in Python 2.5.0 by Thomas Heller and reported to python-dev. This
should be backported to 2.5 .
|
|
|
|
|
|
|
| |
on exception classes. Would require introducing a tp_unicode slot to make it
work otherwise.
Fixes bug #1551432 and will be backported.
|
| |
|
|
|
|
|
| |
Also make sure that every exception class has __module__ set to
'exceptions'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
i_divmod(): As discussed on Python-Dev, changed the overflow
checking to live happily with recent gcc optimizations that
assume signed integer arithmetic never overflows.
This differs from the corresponding change on the 2.5 and 2.4
branches, using a less obscure approach, but one that /may/
tickle platform idiocies in their definitions of LONG_MIN.
The 2.4 + 2.5 change avoided introducing a dependence on
LONG_MIN, at the cost of substantially goofier code.
|
| |
|
|
|
|
| |
Backport candidate.
|
|
|
|
|
|
|
| |
OverflowError while x*x succeeds and produces infinity; apparently
these inconsistencies cannot be fixed across ``all'' platforms and
there's a widespread feeling that therefore ``every'' platform
should keep suffering forevermore. Ah well.
|
|
|
|
|
|
| |
inf) but didn't; added a test to test_float to verify that, and ignored the
ERANGE value for errno in the pow operation to make the new test pass (with
help from Marilyn Davis at the Google Python Sprint -- thanks!).
|
|
|
|
|
|
| |
a unicode string in a build with wide unicode (UCS-4) support.
This code could be improved, so add an XXX comment.
|
| |
|
|
|
|
|
|
| |
Klocwork 286-287.
(I'm not backporting this, but if someone wants to, feel free.)
|
|
|
|
|
|
| |
object so we don't leak op. (Fixes an earlier patch to this code)
Klockwork #350
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Replace UnicodeDecodeErrors raised during == and !=
compares of Unicode and other objects with a new
UnicodeWarning.
All other comparisons continue to raise exceptions.
Exceptions other than UnicodeDecodeErrors are also left
untouched.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
__oct__, __hex__ don't return a string.
Klocwork 308
|
|
|
|
| |
Should fix most of Klocwork 234-272.
|
|
|
|
|
|
|
|
|
|
|
| |
were failing due to inappropriate clipping of numbers larger than 2**31
with new-style classes. (typeobject.c) In reviewing the code for classic
classes, there were 2 problems. Any negative value return could be returned.
Always return -1 if there was an error. Also make the checks similar
with the new-style classes. I believe this is correct for 32 and 64 bit
boxes, including Windows64.
Add a test of classic classes too.
|
|
|
|
|
|
|
| |
I modified this patch some by fixing style, some error checking, and adding
XXX comments. This patch requires review and some changes are to be expected.
I'm checking in now to get the greatest possible review and establish a
baseline for moving forward. I don't want this to hold up release if possible.
|
|
|
|
|
|
| |
Check seq in both portions of if/else.
Klocwork #289-290.
|
|
|
|
| |
were not supposed to go it. Only Modules/_ctypes/cfields.c was supposed to be changed
|
|
|
|
| |
Klocwork #233
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
| |
value is obtained by invoking hash on the long int.
Fixes #1536021.
|
|
|
|
| |
must not.
|
|
|
|
|
|
|
| |
PyMapping_Size and PySequence_Size.
Because len() tries first sequence, then mapping size, it will always
raise a "non-mapping object has no len" error which is confusing.
|
| |
|
| |
|
| |
|
| |
|