mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
SF patch #1467512, fix double free with triple quoted string in standard build.
This was the result of inconsistent use of PyMem_* and PyObject_* allocators. By changing to use PyObject_* allocator almost everywhere, this removes the inconsistency.
This commit is contained in:
parent
65c05b20e9
commit
2c4e4f9839
9 changed files with 45 additions and 37 deletions
|
|
@ -62,7 +62,7 @@ fancy_roundup(int n)
|
|||
* Win98).
|
||||
*
|
||||
* In a run of compileall across the 2.3a0 Lib directory, Andrew MacIntyre
|
||||
* reported that, with this scheme, 89% of PyMem_RESIZE calls in
|
||||
* reported that, with this scheme, 89% of PyObject_REALLOC calls in
|
||||
* PyNode_AddChild passed 1 for the size, and 9% passed 4. So this usually
|
||||
* wastes very little memory, but is very effective at sidestepping
|
||||
* platform-realloc disasters on vulnernable platforms.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue