A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/021988.html below:

[Python-Dev] pymalloc killer

[Python-Dev] pymalloc killer [Python-Dev] pymalloc killerMartin v. Loewis martin@v.loewis.de
30 Mar 2002 17:56:51 +0100
Guido van Rossum <guido@python.org> writes:

> How about if the PyMem_Free guy saved the address of the vector before
> using it, and checked that it was still the same afterwards, *and* if
> the PyMem_Malloc guy didn't use realloc to resize the vector but
> copied it to a newly malloc'ed vector, stored the new vector's
> address, and then freed the old vector?

That doesn't really help. The code currently does

	((I) < narenas && (uptr)(P) - arenas[I] < (uptr)ARENA_SIZE)

So if the PyMem_Free thread blocks (yields by OS command) after
fetching arenas, but before fetching arenas[i], then the PyMem_Malloc
thread could still free the memory under it.

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4