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
c4821d62
Kaydet (Commit)
c4821d62
authored
Kas 22, 2014
tarafından
Zachary Ware
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Closes #22869: Move PyOS_CheckStack back to pythonrun.c
üst
9b59dd47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
38 deletions
+37
-38
pylifecycle.c
Python/pylifecycle.c
+0
-38
pythonrun.c
Python/pythonrun.c
+37
-0
No files found.
Python/pylifecycle.c
Dosyayı görüntüle @
c4821d62
...
...
@@ -1431,44 +1431,6 @@ Py_FdIsInteractive(FILE *fp, const char *filename)
}
#if defined(USE_STACKCHECK)
#if defined(WIN32) && defined(_MSC_VER)
/* Stack checking for Microsoft C */
#include <malloc.h>
#include <excpt.h>
/*
* Return non-zero when we run out of memory on the stack; zero otherwise.
*/
int
PyOS_CheckStack
(
void
)
{
__try
{
/* alloca throws a stack overflow exception if there's
not enough space left on the stack */
alloca
(
PYOS_STACK_MARGIN
*
sizeof
(
void
*
));
return
0
;
}
__except
(
GetExceptionCode
()
==
STATUS_STACK_OVERFLOW
?
EXCEPTION_EXECUTE_HANDLER
:
EXCEPTION_CONTINUE_SEARCH
)
{
int
errcode
=
_resetstkoflw
();
if
(
errcode
==
0
)
{
Py_FatalError
(
"Could not reset the stack!"
);
}
}
return
1
;
}
#endif
/* WIN32 && _MSC_VER */
/* Alternate implementations can be added here... */
#endif
/* USE_STACKCHECK */
/* Wrappers around sigaction() or signal(). */
PyOS_sighandler_t
...
...
Python/pythonrun.c
Dosyayı görüntüle @
c4821d62
...
...
@@ -1376,6 +1376,43 @@ cleanup:
}
#if defined(USE_STACKCHECK)
#if defined(WIN32) && defined(_MSC_VER)
/* Stack checking for Microsoft C */
#include <malloc.h>
#include <excpt.h>
/*
* Return non-zero when we run out of memory on the stack; zero otherwise.
*/
int
PyOS_CheckStack
(
void
)
{
__try
{
/* alloca throws a stack overflow exception if there's
not enough space left on the stack */
alloca
(
PYOS_STACK_MARGIN
*
sizeof
(
void
*
));
return
0
;
}
__except
(
GetExceptionCode
()
==
STATUS_STACK_OVERFLOW
?
EXCEPTION_EXECUTE_HANDLER
:
EXCEPTION_CONTINUE_SEARCH
)
{
int
errcode
=
_resetstkoflw
();
if
(
errcode
==
0
)
{
Py_FatalError
(
"Could not reset the stack!"
);
}
}
return
1
;
}
#endif
/* WIN32 && _MSC_VER */
/* Alternate implementations can be added here... */
#endif
/* USE_STACKCHECK */
/* Deprecated C API functions still provided for binary compatiblity */
#undef PyParser_SimpleParseFile
...
...
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