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
|
@ -1,4 +1,6 @@
|
|||
from test.test_json import PyTest, CTest
|
||||
import unittest
|
||||
import cosmo
|
||||
|
||||
|
||||
class JSONTestObject:
|
||||
|
@ -65,6 +67,7 @@ class TestRecursion:
|
|||
self.fail("didn't raise ValueError on default recursion")
|
||||
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_highly_nested_objects_decoding(self):
|
||||
# test that loading highly-nested objects doesn't segfault when C
|
||||
# accelerations are used. See #12017
|
||||
|
@ -75,6 +78,7 @@ class TestRecursion:
|
|||
with self.assertRaises(RecursionError):
|
||||
self.loads('[' * 100000 + '1' + ']' * 100000)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_highly_nested_objects_encoding(self):
|
||||
# See #12051
|
||||
l, d = [], {}
|
||||
|
@ -85,6 +89,7 @@ class TestRecursion:
|
|||
with self.assertRaises(RecursionError):
|
||||
self.dumps(d)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_endless_recursion(self):
|
||||
# See #12051
|
||||
class EndlessJSONEncoder(self.json.JSONEncoder):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue