RE: [Python-Dev] Proposal: thread.get_dict

Armin Rigo writes:
I am pretty sure that some extension modules would badly crash if arbitrary Python code would be allowed to temper with the data that they store there.
We're all consenting adults here. Tampering with the private data of an extension module is a well-known way to crash Python. -- Michael Chermside This email may contain confidential or privileged information. If you believe you have received the message in error, please notify the sender and delete the message without copying or disclosing it.

Hello Michael, On Mon, Jun 28, 2004 at 03:00:32PM -0400, Chermside, Michael wrote:
I am pretty sure that some extension modules would badly crash if arbitrary Python code would be allowed to temper with the data that they store there.
We're all consenting adults here. Tampering with the private data of an extension module is a well-known way to crash Python.
Is it? I am not aware of any such example in the standard library. I am sure that it would be considered as a bug. The only (internal and expected) ways to crash the Python interpreter from Python are currently to abuse new.code() or gc.getreferents(). If an extension module allows this kind of tampering from Python code I'd consider it poorly written. Armin

Armin Rigo <arigo@tunes.org> writes:
Hello Michael,
On Mon, Jun 28, 2004 at 03:00:32PM -0400, Chermside, Michael wrote:
I am pretty sure that some extension modules would badly crash if arbitrary Python code would be allowed to temper with the data that they store there.
We're all consenting adults here. Tampering with the private data of an extension module is a well-known way to crash Python.
Is it? I am not aware of any such example in the standard library. I am sure that it would be considered as a bug. The only (internal and expected) ways to crash the Python interpreter from Python are currently to abuse new.code() or gc.getreferents().
I know at least two more: abusing CObjects a la my post to python-dev some months back now, and the oft-repeated "falling off the end of the stack".
If an extension module allows this kind of tampering from Python code I'd consider it poorly written.
I concur. Cheers, mwh -- ... but I guess there are some things that are so gross you just have to forget, or it'll destroy something within you. perl is the first such thing I have known. -- Erik Naggum, comp.lang.lisp
participants (3)
-
Armin Rigo
-
Chermside, Michael
-
Michael Hudson