svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes
........
r51379 | thomas.heller | 2006-08-18 16:38:46 +0200 (Fr, 18 Aug 2006) | 6 lines
Add asserts to check for 'impossible' NULL values, with comments.
In one place where I'n not 1000% sure about the non-NULL, raise
a RuntimeError for safety.
This should fix the klocwork issues that Neal sent me. If so,
it should be applied to the release25-maint branch also.
........
r51401 | neal.norwitz | 2006-08-19 06:23:04 +0200 (Sa, 19 Aug 2006) | 4 lines
Move assert to after NULL check, otherwise we deref NULL in the assert.
Klocwork #307
........
r51819 | thomas.heller | 2006-09-07 20:56:28 +0200 (Do, 07 Sep 2006) | 5 lines
Anonymous structure fields that have a bit-width specified did not work,
and they gave a strange error message from PyArg_ParseTuple:
function takes exactly 2 arguments (3 given).
With tests.
........
r51820 | thomas.heller | 2006-09-07 21:09:54 +0200 (Do, 07 Sep 2006) | 4 lines
The cast function did not accept c_char_p or c_wchar_p instances
as first argument, and failed with a 'bad argument to internal function'
error message.
........
r52365 | thomas.heller | 2006-10-17 21:30:48 +0200 (Di, 17 Okt 2006) | 6 lines
ctypes callback functions only support 'fundamental' result types.
Check this and raise an error when something else is used - before
this change ctypes would hang or crash when such a callback was
called. This is a partial fix for #1574584.
Will backport to release25-maint.
........
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes
(This had to be done with the command line:
svnmerge init -r 1:51333 -F c:\svn\trunk\Modules\_ctypes
because svnmerge isn't able to deduce the branch point r51333 and the
HEAD URL automatically in a subdirectory.)
Check this and raise an error when something else is used - before
this change ctypes would hang or crash when such a callback was
called. This is a partial fix for #1574584.
Backported from trunk.
with this change.]
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.
* 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...