mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Fix Pyston speedups (#281)
We remove (i.e. hide behind a debug ifdef) the recursion checking methods, and the memory hooks and memory allocator methods. ASAN mode has no PYMALLOC, so we need a macro. Fix build break with des.c stack allocation.
This commit is contained in:
parent
2fe8571010
commit
57f0eed382
42 changed files with 260 additions and 63 deletions
5
third_party/python/Lib/test/test_sys.py
vendored
5
third_party/python/Lib/test/test_sys.py
vendored
|
@ -1,6 +1,7 @@
|
|||
import unittest, test.support
|
||||
from test.support.script_helper import assert_python_ok, assert_python_failure
|
||||
import sys, io, os
|
||||
import cosmo
|
||||
import struct
|
||||
import subprocess
|
||||
import textwrap
|
||||
|
@ -190,6 +191,7 @@ class SysModuleTest(unittest.TestCase):
|
|||
finally:
|
||||
sys.setswitchinterval(orig)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_recursionlimit(self):
|
||||
self.assertRaises(TypeError, sys.getrecursionlimit, 42)
|
||||
oldlimit = sys.getrecursionlimit()
|
||||
|
@ -199,6 +201,7 @@ class SysModuleTest(unittest.TestCase):
|
|||
self.assertEqual(sys.getrecursionlimit(), 10000)
|
||||
sys.setrecursionlimit(oldlimit)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_recursionlimit_recovery(self):
|
||||
if hasattr(sys, 'gettrace') and sys.gettrace():
|
||||
self.skipTest('fatal error if run with a trace function')
|
||||
|
@ -222,6 +225,7 @@ class SysModuleTest(unittest.TestCase):
|
|||
finally:
|
||||
sys.setrecursionlimit(oldlimit)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
@test.support.cpython_only
|
||||
def test_setrecursionlimit_recursion_depth(self):
|
||||
# Issue #25274: Setting a low recursion limit must be blocked if the
|
||||
|
@ -257,6 +261,7 @@ class SysModuleTest(unittest.TestCase):
|
|||
finally:
|
||||
sys.setrecursionlimit(oldlimit)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_recursionlimit_fatalerror(self):
|
||||
# A fatal error occurs if a second recursion limit is hit when recovering
|
||||
# from a first one.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue