svfgit / tinypy

Automatically exported from code.google.com/p/tinypy
Other
0 stars 0 forks source link

some cpython/cpython.c cpython C API code doesn't check return values #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hi,

In here, some of the function calls aren't checking for errors:
http://code.google.com/p/tinypy/source/browse/branches/sandbox/modules/cpython/c
python.c

Need to go over each of the CPython C API function calls, and check for errors.

eg, the return value of PyList_Append is not checked.

also... in:
Tinypy_init(TinypyObject *self, PyObject *args, PyObject *kwds)

Need to do input validation.  This function uses signed values for time,
and memory limits.  Is this needed?  I think checking for unsigned values
would be better.

cheers,

Original issue reported on code.google.com by ren...@gmail.com on 5 Sep 2008 at 7:11

GoogleCodeExporter commented 9 years ago
I've fixed the above mentioned issues so I think it's safe to close this bug 
for now.
Also, I've changed the memory limit to use an unsigned long value, but the time 
limit
must stay as double as we need it for resolution.

Original comment by denis.ka...@gmail.com on 26 Sep 2008 at 12:45