New submission from Kevin Modzelewski :
The problem is that the descriptor-ness of a type-level attribute is only
checked at opcache-set time, not at opcache-hit time.
$ python3.8 test.py
2
$ ./python --version
Python 3.10.0a2+
$ git rev-parse --short HEAD
789359f47c
$ ./python test.py
1
New submission from Kevin Modzelewski:
The super() __init__ function fills in the fields of a super object without
checking if they were already set. If someone happens to call __init__ again,
the previously-set references will end up getting forgotten and leak memory.
For example:
import
New submission from Kevin Modzelewski:
The slice type doesn't participate in GC, which means that if you happen to
create a cycle involving a slice, that cycle will never get freed. Here's an
example:
def f():
l = []
l.append(slice(l))
# Will consume memory without bound:
Kevin Modzelewski added the comment:
Awesome, thanks!
--
___
Python tracker
<http://bugs.python.org/issue24731>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Kevin Modzelewski:
(Using python 3 terminology) str_subtype_new is the function that creates
instances of any subtypes of bytes (ie is called by bytes_new if the requested
type is not PyBytes_Type -- looks like this function's name comes from python
2). Its approa