]> granicus.if.org Git - python/commit
SF bug 1185883: PyObject_Realloc can't safely take over a block currently
authorTim Peters <tim.peters@gmail.com>
Sun, 10 Jul 2005 22:30:55 +0000 (22:30 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 10 Jul 2005 22:30:55 +0000 (22:30 +0000)
commitecc6e6a54ed4bb22b8b78dc1eca9183992ac3f40
treef7738f45fa8a5398483009efb06aa649a6e84376
parent7d66b00f293875c505e704ad9171ba1bd20c3c19
SF bug 1185883:  PyObject_Realloc can't safely take over a block currently
managed by C, because it's possible for the block to be smaller than the
new requested size, and at the end of allocated VM.  Trying to copy over
nbytes bytes to a Python small-object block can segfault then, and there's
no portable way to avoid this (we would have to know how many bytes
starting at p are addressable, and std C has no means to determine that).

Bugfix candidate.  Should be backported to 2.4, but I'm out of time.
Misc/NEWS
Objects/obmalloc.c