[issue26659] slice() leaks memory when part of a cycle

2016-04-16 Thread Martin Panter

Changes by Martin Panter :


--
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26659] slice() leaks memory when part of a cycle

2016-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 879da9400529 by Benjamin Peterson in branch '2.7':
add gc support to slice (closes #26659)
https://hg.python.org/cpython/rev/879da9400529

New changeset 9e2176d18965 by Benjamin Peterson in branch '3.5':
add gc support to slice (closes #26659)
https://hg.python.org/cpython/rev/9e2176d18965

New changeset 870fcc50f1bd by Benjamin Peterson in branch 'default':
merge 3.5 (#26659)
https://hg.python.org/cpython/rev/870fcc50f1bd

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26659] slice() leaks memory when part of a cycle

2016-03-29 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26659] slice() leaks memory when part of a cycle

2016-03-29 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +benjamin.peterson, georg.brandl, pitrou, yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26659] slice() leaks memory when part of a cycle

2016-03-28 Thread Demur Rumed

Demur Rumed added the comment:

Implementing tp_traverse & tp_clear seems to runs into complications due to 
slice_cache

--
nosy: +Demur Rumed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26659] slice() leaks memory when part of a cycle

2016-03-28 Thread Kevin Modzelewski

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:
while True:
f()

This seems pretty hard to trigger accidentally, so it might not be a huge deal 
-- especially since it seems to have been around for a while.  (I only checked 
2.7 and trunk though.)

I think this could be solved by either having the slice class participate in GC 
(ie add tp_traverse and tp_clear methods), or maybe doing some type-filtering 
during slice_new().

--
components: Interpreter Core
messages: 262582
nosy: Kevin Modzelewski
priority: normal
severity: normal
status: open
title: slice() leaks memory when part of a cycle
type: resource usage
versions: Python 2.7, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com