jit/backend/llsupport/test/test_gc.py::TestFramework::()::test_gc_malloc_unicode
self = <rpython.jit.backend.llsupport.test.test_gc.TestFramework object at 0x7f94d0db4310>
meth = <bound method TestFramework.test_gc_malloc_unicode of <rpython.jit.backend.llsupport.test.test_gc.TestFramework object at 0x7f94d0db4310>>
def setup_method(self, meth):
class config_(object):
class translation(object):
gc = self.gc
gcrootfinder = 'shadowstack'
gctransformer = 'framework'
gcremovetypeptr = False
class FakeTranslator(object):
config = config_
class FakeCPU(object):
def cast_adr_to_int(self, adr):
if not adr:
return 0
try:
ptr = llmemory.cast_adr_to_ptr(adr, gc_ll_descr.WB_FUNCPTR)
assert ptr._obj._callable == \
llop1._write_barrier_failing_case
return 42
except lltype.InvalidCast:
ptr = llmemory.cast_adr_to_ptr(
adr, gc_ll_descr.WB_ARRAY_FUNCPTR)
assert ptr._obj._callable == \
llop1._write_barrier_from_array_failing_case
return 43
gcdescr = get_description(config_)
llop1 = FakeLLOp()
gc_ll_descr = gc.GcLLDescr_framework(gcdescr, FakeTranslator(), None,
> llop1)
jit/backend/llsupport/test/test_gc.py:137:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jit/backend/llsupport/gc.py:334: in __init__
self._make_layoutbuilder()
jit/backend/llsupport/gc.py:373: in _make_layoutbuilder
self.layoutbuilder = framework.TransformerLayoutBuilder(translator)
memory/gctransform/framework.py:1679: in __init__
GCClass, _ = choose_gc_from_config(translator.config)
memory/gc/base.py:593: in choose_gc_from_config
globals(), locals(), [classname])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""
# XXX Should find a way to bound the major collection threshold by the
# XXX total addressable size. Maybe by keeping some minimarkpage arenas
# XXX pre-reserved, enough for a few nursery collections? What about
# XXX raw-malloced memory?
import sys
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup
from rpython.rtyper.lltypesystem.lloperation import llop
from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage
from rpython.memory.gc.base import GCBase, MovingGCBase
> from rpython.memory.gc import env
E File "/build_dir/rpython-linux-x86-64/build/rpython/memory/gc/env.py", line 423
E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/rpython-linux-x86-64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
memory/gc/minimark.py:55: SyntaxError
builder: rpython-linux-x86-64 build #898+
test: jit/backend/llsupport/test/test_gc.py::TestFramework::()::test_gc_malloc_unicode