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
64c82753
Kaydet (Commit)
64c82753
authored
Tem 07, 2016
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
reduce marshal stack size in debug mode on windows (closes #27019)
üst
ee69451f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
test_marshal.py
Lib/test/test_marshal.py
+4
-1
marshal.c
Python/marshal.c
+5
-0
No files found.
Lib/test/test_marshal.py
Dosyayı görüntüle @
64c82753
...
@@ -234,7 +234,10 @@ class BugsTestCase(unittest.TestCase):
...
@@ -234,7 +234,10 @@ class BugsTestCase(unittest.TestCase):
# Create a deeply nested structure.
# Create a deeply nested structure.
head
=
last
=
[]
head
=
last
=
[]
# The max stack depth should match the value in Python/marshal.c.
# The max stack depth should match the value in Python/marshal.c.
MAX_MARSHAL_STACK_DEPTH
=
2000
if
os
.
name
==
'nt'
and
hasattr
(
sys
,
'gettotalrefcount'
):
MAX_MARSHAL_STACK_DEPTH
=
1000
else
:
MAX_MARSHAL_STACK_DEPTH
=
2000
for
i
in
range
(
MAX_MARSHAL_STACK_DEPTH
-
2
):
for
i
in
range
(
MAX_MARSHAL_STACK_DEPTH
-
2
):
last
.
append
([
0
])
last
.
append
([
0
])
last
=
last
[
-
1
]
last
=
last
[
-
1
]
...
...
Python/marshal.c
Dosyayı görüntüle @
64c82753
...
@@ -16,8 +16,13 @@
...
@@ -16,8 +16,13 @@
/* High water mark to determine when the marshalled object is dangerously deep
/* High water mark to determine when the marshalled object is dangerously deep
* and risks coring the interpreter. When the object stack gets this deep,
* and risks coring the interpreter. When the object stack gets this deep,
* raise an exception instead of continuing.
* raise an exception instead of continuing.
* On Windows debug builds, reduce this value.
*/
*/
#if defined(MS_WINDOWS) && defined(_DEBUG)
#define MAX_MARSHAL_STACK_DEPTH 1000
#else
#define MAX_MARSHAL_STACK_DEPTH 2000
#define MAX_MARSHAL_STACK_DEPTH 2000
#endif
#define TYPE_NULL '0'
#define TYPE_NULL '0'
#define TYPE_NONE 'N'
#define TYPE_NONE 'N'
...
...
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