[issue6600] MemoryError in AiX 64-bit build - PyMem_MALLOC failed

Sridhar Ratnakumar report at bugs.python.org
Thu Jul 30 21:29:29 CEST 2009


Sridhar Ratnakumar <sridharr at activestate.com> added the comment:

This is after preprocessor run (cc_r -E):-

Original:
newmode = (((__strlen(mode) + 3) < 0 || (__strlen(mode) + 3) > 
((Py_ssize_t)(((size_t)-1)>>1))) ? 0 : malloc((__strlen(mode) + 3) ? 
(__strlen(mode) + 3) : 1));

Patched:
newmode = (((3 + __strlen(mode)) < 0 || (3 + __strlen(mode)) > 
((Py_ssize_t)(((size_t)-1)>>1))) ? 0 : malloc((3 + __strlen(mode)) ? (3 
+ __strlen(mode)) : 1));

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6600>
_______________________________________


More information about the Python-bugs-list mailing list