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/2008-February/076971.html below:

[Python-Dev] Py_CLEAR to avoid crashes

[Python-Dev] Py_CLEAR to avoid crashes [Python-Dev] Py_CLEAR to avoid crashes"Martin v. Löwis" martin at v.loewis.de
Tue Feb 19 01:17:50 CET 2008
>> Most Py_DECREF calls are probably okay but it's going to be hard
>> to find the ones that are not.
> 
> I suppose Py_DECREF is not the only source of trouble.  Many calls
> to the Python API can end up calling arbitrary user code (via
> __getattr__, __getitem__, etc.).  Whenever an object does that, it
> must be prepared to be accessed from user code.  I'm guessing there
> are many subtle bugs of this nature lurking.  Py_DECREF is perhaps
> the most common though.  Maybe renaming it to
> Py_DECREF_AND_RUN_EVIL_USER_CODE would help. ;-)

But that's unrelated to this issue. In those other cases, the refcount
won't be zero, so the object is still there.

Regards,
Martin
More information about the Python-Dev mailing list

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