[New-bugs-announce] [issue24581] Crash when a set is changed during iteration

Serhiy Storchaka report at bugs.python.org
Tue Jul 7 10:09:09 CEST 2015


New submission from Serhiy Storchaka:

Changeset c9782a9ac031 caused segmentation fault when underlying table of the set is reallocated but the number of set elements is kept the same during iteration. Crash reproducer:

s = set(range(100))
s.clear()
s.update(range(100))
si = iter(s)
s.clear()
a = list(range(100))
s.update(range(100))
list(si)

----------
components: Interpreter Core
messages: 246394
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Crash when a set is changed during iteration
type: crash
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24581>
_______________________________________


More information about the New-bugs-announce mailing list