Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
a3626bc5
Kaydet (Commit)
a3626bc5
authored
Tem 16, 2015
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24583: Fix crash when set is mutated while being updated.
üst
ced770da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
test_set.py
Lib/test/test_set.py
+13
-0
NEWS
Misc/NEWS
+2
-0
setobject.c
Objects/setobject.c
+2
-1
No files found.
Lib/test/test_set.py
Dosyayı görüntüle @
a3626bc5
...
@@ -1742,6 +1742,19 @@ class TestWeirdBugs(unittest.TestCase):
...
@@ -1742,6 +1742,19 @@ class TestWeirdBugs(unittest.TestCase):
s
.
update
(
range
(
100
))
s
.
update
(
range
(
100
))
list
(
si
)
list
(
si
)
def
test_merge_and_mutate
(
self
):
class
X
:
def
__hash__
(
self
):
return
hash
(
0
)
def
__eq__
(
self
,
o
):
other
.
clear
()
return
False
other
=
set
()
other
=
{
X
()
for
i
in
range
(
10
)}
s
=
{
0
}
s
.
update
(
other
)
# Application tests (based on David Eppstein's graph recipes ====================================
# Application tests (based on David Eppstein's graph recipes ====================================
def
powerset
(
U
):
def
powerset
(
U
):
...
...
Misc/NEWS
Dosyayı görüntüle @
a3626bc5
...
@@ -12,6 +12,8 @@ Core and Builtins
...
@@ -12,6 +12,8 @@ Core and Builtins
- Issue #24569: Make PEP 448 dictionary evaluation more consistent.
- Issue #24569: Make PEP 448 dictionary evaluation more consistent.
- Issue #24583: Fix crash when set is mutated while being updated.
- Issue #24407: Fix crash when dict is mutated while being updated.
- Issue #24407: Fix crash when dict is mutated while being updated.
Library
Library
...
...
Objects/setobject.c
Dosyayı görüntüle @
a3626bc5
...
@@ -600,7 +600,8 @@ set_merge(PySetObject *so, PyObject *otherset)
...
@@ -600,7 +600,8 @@ set_merge(PySetObject *so, PyObject *otherset)
}
}
/* We can't assure there are no duplicates, so do normal insertions */
/* We can't assure there are no duplicates, so do normal insertions */
for
(
i
=
0
;
i
<=
other
->
mask
;
i
++
,
other_entry
++
)
{
for
(
i
=
0
;
i
<=
other
->
mask
;
i
++
)
{
other_entry
=
&
other
->
table
[
i
];
key
=
other_entry
->
key
;
key
=
other_entry
->
key
;
if
(
key
!=
NULL
&&
key
!=
dummy
)
{
if
(
key
!=
NULL
&&
key
!=
dummy
)
{
Py_INCREF
(
key
);
Py_INCREF
(
key
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment