Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/module/cpyext/test/test_cpyext.py::AppTestCpythonExtension::()::test_init_exception

self = <CallInfo when='call' exception: command 'cc' terminated by signal 10>
func = <function <lambda> at 0x000000015231e548>, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
>           self.result = func()

../_pytest/runner.py:150: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

../_pytest/runner.py:138: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_HookCaller 'pytest_runtest_call'>
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_init_exception'>}

    def __call__(self, **kwargs):
        assert not self.is_historic()
>       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

../_pytest/vendored_packages/pluggy.py:724: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.config.PytestPluginManager object at 0x00000001302920c8>
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x000000014a758220>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_init_exception'>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

../_pytest/vendored_packages/pluggy.py:338: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x000000014a758220>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_init_exception'>}

    self._inner_hookexec = lambda hook, methods, kwargs: \
>       _MultiCall(methods, kwargs, hook.spec_opts).execute()

../_pytest/vendored_packages/pluggy.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>

    def execute(self):
        all_kwargs = self.kwargs
        self.results = results = []
        firstresult = self.specopts.get("firstresult")
    
        while self.hook_impls:
            hook_impl = self.hook_impls.pop()
            args = [all_kwargs[argname] for argname in hook_impl.argnames]
            if hook_impl.hookwrapper:
>               return _wrapped_call(hook_impl.function(*args), self.execute)

../_pytest/vendored_packages/pluggy.py:595: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

wrap_controller = <generator object pytest_runtest_call at 0x000000011210ea20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def _wrapped_call(wrap_controller, func):
        """ Wrap calling to a function with a generator which needs to yield
        exactly once.  The yield point will trigger calling the wrapped function
        and return its _CallOutcome to the yield point.  The generator then needs
        to finish (raise StopIteration) in order for the wrapped call to complete.
        """
        try:
            next(wrap_controller)   # first yield
        except StopIteration:
            _raise_wrapfail(wrap_controller, "did not yield")
        call_outcome = _CallOutcome(func)
        try:
            wrap_controller.send(call_outcome)
            _raise_wrapfail(wrap_controller, "has second yield")
        except StopIteration:
            pass
>       return call_outcome.get_result()

../_pytest/vendored_packages/pluggy.py:253: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x0000000112f67720>

    def get_result(self):
        if self.excinfo is None:
            return self.result
        else:
            ex = self.excinfo
            if _py3:
                raise ex[1].with_traceback(ex[2])
>           _reraise(*ex)  # noqa

../_pytest/vendored_packages/pluggy.py:279: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x0000000112f67720>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def __init__(self, func):
        try:
>           self.result = func()

../_pytest/vendored_packages/pluggy.py:264: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>

    def execute(self):
        all_kwargs = self.kwargs
        self.results = results = []
        firstresult = self.specopts.get("firstresult")
    
        while self.hook_impls:
            hook_impl = self.hook_impls.pop()
            args = [all_kwargs[argname] for argname in hook_impl.argnames]
            if hook_impl.hookwrapper:
>               return _wrapped_call(hook_impl.function(*args), self.execute)

../_pytest/vendored_packages/pluggy.py:595: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

wrap_controller = <generator object pytest_runtest_call at 0x000000011210e958>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def _wrapped_call(wrap_controller, func):
        """ Wrap calling to a function with a generator which needs to yield
        exactly once.  The yield point will trigger calling the wrapped function
        and return its _CallOutcome to the yield point.  The generator then needs
        to finish (raise StopIteration) in order for the wrapped call to complete.
        """
        try:
            next(wrap_controller)   # first yield
        except StopIteration:
            _raise_wrapfail(wrap_controller, "did not yield")
        call_outcome = _CallOutcome(func)
        try:
            wrap_controller.send(call_outcome)
            _raise_wrapfail(wrap_controller, "has second yield")
        except StopIteration:
            pass
>       return call_outcome.get_result()

../_pytest/vendored_packages/pluggy.py:253: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x0000000112f676e0>

    def get_result(self):
        if self.excinfo is None:
            return self.result
        else:
            ex = self.excinfo
            if _py3:
                raise ex[1].with_traceback(ex[2])
>           _reraise(*ex)  # noqa

../_pytest/vendored_packages/pluggy.py:279: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x0000000112f676e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def __init__(self, func):
        try:
>           self.result = func()

../_pytest/vendored_packages/pluggy.py:264: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>

    def execute(self):
        all_kwargs = self.kwargs
        self.results = results = []
        firstresult = self.specopts.get("firstresult")
    
        while self.hook_impls:
            hook_impl = self.hook_impls.pop()
            args = [all_kwargs[argname] for argname in hook_impl.argnames]
            if hook_impl.hookwrapper:
                return _wrapped_call(hook_impl.function(*args), self.execute)
>           res = hook_impl.function(*args)

../_pytest/vendored_packages/pluggy.py:596: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = <AppTestMethod 'test_init_exception'>

    def pytest_runtest_call(item):
        try:
>           item.runtest()

../_pytest/runner.py:91: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AppTestMethod 'test_init_exception'>

    def runtest(self):
        target = self.obj
        src = extract_docstring_if_empty_function(target.im_func)
        space = target.im_self.space
        if self.config.option.runappdirect:
            appexec_definitions = self.parent.obj.__dict__
            spaceconfig = getattr(self.parent.obj, 'spaceconfig', None)
            usemodules = spaceconfig.get('usemodules') if spaceconfig else None
            return run_with_python(self.config.option.python, src, usemodules,
                                   **appexec_definitions)
        filename = self._getdynfilename(target)
        func = app2interp_temp(src, filename=filename)
        w_instance = self.parent.w_instance
>       self.execute_appex(space, func, space, w_instance)

tool/pytest/apptest.py:331: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AppTestMethod 'test_init_exception'>, space = StdObjSpace
target = <function test_init_exception at 0x000000015231e638>
args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000000131916d78>)

    def execute_appex(self, space, target, *args):
        self.space = space
        space.getexecutioncontext().set_sys_exc_info(None)
        try:
>           target(*args)

tool/pytest/apptest.py:267: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

space = StdObjSpace
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000000131916d78>,)
w_func = <Function test_init_exception>
args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000000131916d78>

    def appcaller(space, *args_w):
        if not isinstance(space, ObjSpace):
            raise TypeError("first argument must be a space instance.")
        # the last argument can be an Arguments
        w_func = self.wget(space, name)
        if not args_w:
            return space.call_function(w_func)
        else:
            args = args_w[-1]
            assert args is not None
            if not isinstance(args, Arguments):
>               return space.call_function(w_func, *args_w)

interpreter/gateway.py:1409: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = StdObjSpace, w_func = <Function test_init_exception>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000000131916d78>,)
nargs = 1, Function = <class 'pypy.interpreter.function.Function'>
_Method = <class 'pypy.interpreter.function._Method'>

    def call_function(self, w_func, *args_w):
        nargs = len(args_w) # used for pruning funccall versions
        if not self.config.objspace.disable_call_speedhacks and nargs < 5:
            # start of hack for performance
            from pypy.interpreter.function import Function, _Method
            if isinstance(w_func, _Method):
                if nargs < 4:
                    func = w_func.w_function
                    if isinstance(func, Function):
                        return func.funccall(w_func.w_instance, *args_w)
    
            if isinstance(w_func, Function):
>               return w_func.funccall(*args_w)

interpreter/baseobjspace.py:1237: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Function test_init_exception>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000000131916d78>,)
gateway = <module 'pypy.interpreter.gateway' from '/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/interpreter/gateway.pyc'>
PyCode = <class 'pypy.interpreter.pycode.PyCode'>
code = <code object test_init_exception, file "[/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1>

    def funccall(self, *args_w): # speed hack
        from pypy.interpreter import gateway
        from pypy.interpreter.pycode import PyCode
    
        code = self.getcode() # hook for the jit
        nargs = len(args_w)
        fast_natural_arity = code.fast_natural_arity
        if nargs == fast_natural_arity:
            if nargs == 0:
                assert isinstance(code, gateway.BuiltinCode0)
                return code.fastcall_0(self.space, self)
            elif nargs == 1:
                assert isinstance(code, gateway.BuiltinCode1)
                return code.fastcall_1(self.space, self, args_w[0])
            elif nargs == 2:
                assert isinstance(code, gateway.BuiltinCode2)
                return code.fastcall_2(self.space, self, args_w[0], args_w[1])
            elif nargs == 3:
                assert isinstance(code, gateway.BuiltinCode3)
                return code.fastcall_3(self.space, self, args_w[0],
                                       args_w[1], args_w[2])
            elif nargs == 4:
                assert isinstance(code, gateway.BuiltinCode4)
                return code.fastcall_4(self.space, self, args_w[0],
                                       args_w[1], args_w[2], args_w[3])
        elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity:
            assert isinstance(code, PyCode)
            if nargs < 5:
                new_frame = self.space.createframe(code, self.w_func_globals,
                                                   self)
                for i in funccallunrolling:
                    if i < nargs:
                        new_frame.locals_cells_stack_w[i] = args_w[i]
>               return new_frame.run(self.name, self.qualname)

interpreter/function.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init_exc...cos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1> at line 7
name = 'test_init_exception', qualname = 'test_init_exception'

    def run(self, name=None, qualname=None):
        """Start this frame's execution."""
        if self._is_generator_or_coroutine():
            return self.initialize_as_generator(name, qualname)
        else:
>           return self.execute_frame()

interpreter/pyframe.py:256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init_exc...cos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1> at line 7
w_arg_or_err = None

    def execute_frame(self, w_arg_or_err=None):
        """Execute this frame.  Main entry point to the interpreter.
            'w_arg_or_err' is non-None iff we are starting or resuming
            a generator or coroutine frame; in that case, w_arg_or_err
            is the input argument -or- an SApplicationException instance.
            """
        from pypy.interpreter import pyopcode as pyopcode
        # the following 'assert' is an annotation hint: it hides from
        # the annotator all methods that are defined in PyFrame but
        # overridden in the {,Host}FrameClass subclasses of PyFrame.
        assert (isinstance(self, self.space.FrameClass) or
                not self.space.config.translating)
        executioncontext = self.space.getexecutioncontext()
        executioncontext.enter(self)
        got_exception = True
        w_exitvalue = self.space.w_None
        try:
            executioncontext.call_trace(self)
            #
            # Execution starts just after the last_instr.  Initially,
            # last_instr is -1.  After a generator suspends it points to
            # the YIELD_VALUE/YIELD_FROM instruction.
            try:
                try:
                    if w_arg_or_err is None:
                        assert self.last_instr == -1
                        next_instr = r_uint(0)
                    else:
                        next_instr = self.resume_execute_frame(w_arg_or_err)
                except pyopcode.Yield:
                    w_exitvalue = self.popvalue()
                else:
                    w_exitvalue = self.dispatch(self.pycode, next_instr,
                                                executioncontext)
            except OperationError:
                raise
            except Exception as e:      # general fall-back
>               raise self._convert_unexpected_exception(e)

interpreter/pyframe.py:353: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init_exc...cos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1> at line 7
e = CompileError(DistutilsExecError("command 'cc' terminated by signal 10",),)

    def _convert_unexpected_exception(self, e):
        from pypy.interpreter import error
    
>       operr = error.get_converted_unexpected_exception(self.space, e)

interpreter/pyframe.py:844: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init_exc...cos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1> at line 7
w_arg_or_err = None

    def execute_frame(self, w_arg_or_err=None):
        """Execute this frame.  Main entry point to the interpreter.
            'w_arg_or_err' is non-None iff we are starting or resuming
            a generator or coroutine frame; in that case, w_arg_or_err
            is the input argument -or- an SApplicationException instance.
            """
        from pypy.interpreter import pyopcode as pyopcode
        # the following 'assert' is an annotation hint: it hides from
        # the annotator all methods that are defined in PyFrame but
        # overridden in the {,Host}FrameClass subclasses of PyFrame.
        assert (isinstance(self, self.space.FrameClass) or
                not self.space.config.translating)
        executioncontext = self.space.getexecutioncontext()
        executioncontext.enter(self)
        got_exception = True
        w_exitvalue = self.space.w_None
        try:
            executioncontext.call_trace(self)
            #
            # Execution starts just after the last_instr.  Initially,
            # last_instr is -1.  After a generator suspends it points to
            # the YIELD_VALUE/YIELD_FROM instruction.
            try:
                try:
                    if w_arg_or_err is None:
                        assert self.last_instr == -1
                        next_instr = r_uint(0)
                    else:
                        next_instr = self.resume_execute_frame(w_arg_or_err)
                except pyopcode.Yield:
                    w_exitvalue = self.popvalue()
                else:
                    w_exitvalue = self.dispatch(self.pycode, next_instr,
>                                               executioncontext)

interpreter/pyframe.py:349: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init_exc...cos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1> at line 7
pycode = <code object test_init_exception, file "[/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1>
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000000013191ad08>

    def dispatch(self, pycode, next_instr, ec):
        # For the sequel, force 'next_instr' to be unsigned for performance
        next_instr = r_uint(next_instr)
        co_code = pycode.co_code
        try:
            while True:
                assert next_instr & 1 == 0
>               next_instr = self.handle_bytecode(co_code, next_instr, ec)

interpreter/pyopcode.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init_exc...cos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1> at line 7
co_code = 'd\x01d\x00l\x00}\x01d\x02}\x02t\x01t\x02|\x00j\x03d\x03|\x02d\x04\x8d\x04}\x03t\x04|\x03j\x05\x83\x01t\x02u\x01r\x19|\x03j\x05\x82\x01t\x06|\x03j\x05\x83\x01d\x05k\x02s"J\x00\x82\x01d\x00S\x00'
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000000013191ad08>

    def handle_bytecode(self, co_code, next_instr, ec):
        try:
>           next_instr = self.dispatch_bytecode(co_code, next_instr, ec)

interpreter/pyopcode.py:74: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init_exc...cos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1> at line 7
co_code = 'd\x01d\x00l\x00}\x01d\x02}\x02t\x01t\x02|\x00j\x03d\x03|\x02d\x04\x8d\x04}\x03t\x04|\x03j\x05\x83\x01t\x02u\x01r\x19|\x03j\x05\x82\x01t\x06|\x03j\x05\x83\x01d\x05k\x02s"J\x00\x82\x01d\x00S\x00'
next_instr = 28L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000000013191ad08>

    @jit.unroll_safe
    def dispatch_bytecode(self, co_code, next_instr, ec):
        while True:
            assert next_instr & 1 == 0
            self.last_instr = intmask(next_instr)
            if jit.we_are_jitted():
                _d = self.debugdata
                if ec.space.reverse_debugging or (
                        _d is not None and _d.w_f_trace is not None):
                    ec.bytecode_only_trace(self)
                    next_instr = r_uint(self.last_instr)
            else:
                # Only reload next_instr from last_instr when something that
                # can modify it actually ran (trace function or action
                # dispatcher). In the common case (no trace, positive ticker)
                # next_instr is unchanged and the round-trip is skipped.
                _d = self.debugdata
                if ec.space.reverse_debugging or (
                        _d is not None and _d.w_f_trace is not None) or (
                        not we_are_translated() and
                        'bytecode_only_trace' in ec.__dict__):
                    ec.bytecode_only_trace(self)
                    next_instr = r_uint(self.last_instr)
                actionflag = ec.space.actionflag
                if actionflag.decrement_ticker(TICK_COUNTER_STEP) < 0:
                    actionflag.action_dispatcher(ec, self)
                    next_instr = r_uint(self.last_instr)
            opcode = ord(co_code[next_instr])
            oparg = ord(co_code[next_instr + 1])
            next_instr += 2
    
            # note: the structure of the code here is such that it makes
            # (after translation) a big "if/elif" chain, which is then
            # turned into computed gotos.
    
            while opcode == opcodedesc.EXTENDED_ARG.index:
                opcode = ord(co_code[next_instr])
                arg = ord(co_code[next_instr + 1])
                if opcode < HAVE_ARGUMENT:
                    raise BytecodeCorruption
                next_instr += 2
                oparg = (oparg * 256) | arg
    
            if opcode == opcodedesc.RETURN_VALUE.index:
                self.frame_finished_execution = True  # for generators
                raise Return
            elif opcode == opcodedesc.JUMP_ABSOLUTE.index:
                return self.jump_absolute(oparg, next_instr, ec)
            elif opcode == opcodedesc.RERAISE.index:
                return self.RERAISE(oparg, next_instr)
            elif opcode == opcodedesc.FOR_ITER.index:
                next_instr = self.FOR_ITER(oparg, next_instr)
            elif opcode == opcodedesc.JUMP_FORWARD.index:
                next_instr = self.JUMP_FORWARD(oparg, next_instr)
            elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index:
                return self.JUMP_IF_FALSE_OR_POP(oparg, next_instr, ec)
            elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index:
                return self.JUMP_IF_TRUE_OR_POP(oparg, next_instr, ec)
            elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index:
                return self.POP_JUMP_IF_FALSE(oparg, next_instr, ec)
            elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index:
                return self.POP_JUMP_IF_TRUE(oparg, next_instr, ec)
            elif opcode == opcodedesc.POP_JUMP_FORWARD_IF_NONE.index:
                next_instr = self.POP_JUMP_FORWARD_IF_NONE(oparg, next_instr)
            elif opcode == opcodedesc.POP_JUMP_FORWARD_IF_NOT_NONE.index:
                next_instr = self.POP_JUMP_FORWARD_IF_NOT_NONE(oparg, next_instr)
            elif opcode == opcodedesc.JUMP_IF_NOT_EXC_MATCH.index:
                next_instr = self.JUMP_IF_NOT_EXC_MATCH(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_ADD.index:
                self.BINARY_ADD(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_AND.index:
                self.BINARY_AND(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index:
                self.BINARY_FLOOR_DIVIDE(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_MATRIX_MULTIPLY.index:
                self.BINARY_MATRIX_MULTIPLY(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_LSHIFT.index:
                self.BINARY_LSHIFT(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_MODULO.index:
                self.BINARY_MODULO(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_MULTIPLY.index:
                self.BINARY_MULTIPLY(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_OR.index:
                self.BINARY_OR(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_POWER.index:
                self.BINARY_POWER(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_RSHIFT.index:
                self.BINARY_RSHIFT(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_SUBSCR.index:
                self.BINARY_SUBSCR(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_SUBTRACT.index:
                self.BINARY_SUBTRACT(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index:
                self.BINARY_TRUE_DIVIDE(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_XOR.index:
                self.BINARY_XOR(oparg, next_instr)
            elif opcode == opcodedesc.BUILD_CONST_KEY_MAP.index:
                self.BUILD_CONST_KEY_MAP(oparg, next_instr)
            elif opcode == opcodedesc.BUILD_LIST.index:
                self.BUILD_LIST(oparg, next_instr)
            elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index:
                self.BUILD_LIST_FROM_ARG(oparg, next_instr)
            elif opcode == opcodedesc.BUILD_MAP.index:
                self.BUILD_MAP(oparg, next_instr)
            elif opcode == opcodedesc.BUILD_SET.index:
                self.BUILD_SET(oparg, next_instr)
            elif opcode == opcodedesc.BUILD_SLICE.index:
                self.BUILD_SLICE(oparg, next_instr)
            elif opcode == opcodedesc.BUILD_TUPLE.index:
                self.BUILD_TUPLE(oparg, next_instr)
            elif opcode == opcodedesc.CALL_FUNCTION.index:
                self.CALL_FUNCTION(oparg, next_instr)
            elif opcode == opcodedesc.CALL_FUNCTION_KW.index:
>               self.CALL_FUNCTION_KW(oparg, next_instr)

interpreter/pyopcode.py:309: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init_exc...cos-arm64/build/pypy/module/cpyext/test/test_cpyext.py:791]", line 1> at line 7
n_arguments = 2, next_instr = 28L

    @jit.unroll_safe
    def CALL_FUNCTION_KW(self, n_arguments, next_instr):
        from pypy.objspace.std.tupleobject import W_AbstractTupleObject
        space = self.space
        # like in BUILD_CONST_KEY_MAP we can't use space.fixedview because then
        # the immutability of the tuple is lost
        w_tup_varnames = space.interp_w(W_AbstractTupleObject, self.popvalue())
        n_keywords = space.len_w(w_tup_varnames)
        keyword_names_w = [None] * n_keywords
        keywords_w = [None] * n_keywords
        for i in range(n_keywords):
            keyword_names_w[i] = w_tup_varnames.getitem(space, i)
            w_value = self.peekvalue(n_keywords - 1 - i)
            keywords_w[i] = w_value
        self.dropvalues(n_keywords)
        n_arguments -= n_keywords
        arguments = self.popvalues(n_arguments)
        w_function  = self.popvalue()
        args = self.argument_factory(arguments, keyword_names_w, keywords_w, None, None,
                                     w_function=w_function)
        if self.get_is_being_profiled() and function.is_builtin_code(w_function):
            w_result = self.space.call_args_and_c_profile(self, w_function,
                                                          args)
        else:
>           w_result = self.space.call_args(w_function, args)

interpreter/pyopcode.py:1426: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

space = StdObjSpace, w_obj = <FunctionWithFixedCode pypyraises>
args = Arguments([<W_TypeObject 'Exception' at 0x1519cc1a8>, <FunctionWithFixedCode i...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def call_args(space, w_obj, args):
        # two special cases for performance
        if isinstance(w_obj, Function):
>           return w_obj.call_args(args)

objspace/descroperation.py:192: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <FunctionWithFixedCode pypyraises>
args = Arguments([<W_TypeObject 'Exception' at 0x1519cc1a8>, <FunctionWithFixedCode i...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def call_args(self, args):
        # delegate activation to code
>       w_res = self.getcode().funcrun(self, args)

interpreter/function.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x0000000150b2b408>
func = <FunctionWithFixedCode pypyraises>
args = Arguments([<W_TypeObject 'Exception' at 0x1519cc1a8>, <FunctionWithFixedCode i...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def funcrun(self, func, args):
>       return BuiltinCode.funcrun_obj(self, func, None, args)

interpreter/gateway.py:869: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x0000000150b2b408>
func = <FunctionWithFixedCode pypyraises>, w_obj = None
args = Arguments([<W_TypeObject 'Exception' at 0x1519cc1a8>, <FunctionWithFixedCode i...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def funcrun_obj(self, func, w_obj, args):
        space = func.space
        activation = self.activation
    
        scope_w = args.parse_obj(w_obj, func.qualname, self.sig,
                                 func.defs_w, func.w_kw_defs, self.minargs)
        try:
            w_result = activation._run(space, scope_w)
        except DescrMismatch:
            if w_obj is not None:
                args = args.prepend(w_obj)
            return self._type_unwrap_mismatch(space, args)
        except Exception as e:
>           self.handle_exception(space, e)

interpreter/gateway.py:884: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x0000000150b2b408>
space = StdObjSpace
e = CompileError(DistutilsExecError("command 'cc' terminated by signal 10",),)

    def handle_exception(self, space, e):
        try:
            if not we_are_translated():
                raise
            raise e
        except OperationError:
            raise
        except Exception as e:      # general fall-back
            from pypy.interpreter import error
>           raise error.get_converted_unexpected_exception(space, e)

interpreter/gateway.py:908: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x0000000150b2b408>
func = <FunctionWithFixedCode pypyraises>, w_obj = None
args = Arguments([<W_TypeObject 'Exception' at 0x1519cc1a8>, <FunctionWithFixedCode i...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def funcrun_obj(self, func, w_obj, args):
        space = func.space
        activation = self.activation
    
        scope_w = args.parse_obj(w_obj, func.qualname, self.sig,
                                 func.defs_w, func.w_kw_defs, self.minargs)
        try:
>           w_result = activation._run(space, scope_w)

interpreter/gateway.py:878: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinActivation_UwS_ObjSpace_W_Root_W_Root_Arguments object at 0x0000000150b2b4e8>
space = StdObjSpace
scope_w = [<W_TypeObject 'Exception' at 0x1519cc1a8>, <FunctionWithFixedCode import_module>, W_TupleObject(), W_DictObject(<pypy.objspace.std.kwargsdict.KwargsDictStrategy object at 0x0000000112af19f0>)]

    def _run(self, space, scope_w):
>       return self.behavior(space, scope_w[0], scope_w[1], Arguments.frompacked(space, scope_w[2], scope_w[3]))

<408-codegen /Users/matti/build-worker-arm64/own-macos-arm64/build/rpython/tool/sourcetools.py:200>:3: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

space = StdObjSpace
w_ExpectedException = <W_TypeObject 'Exception' at 0x1519cc1a8>
w_expr = <FunctionWithFixedCode import_module>
__args__ = Arguments([], ['name', 'init'], [W_UnicodeObject('foo'), W_UnicodeObject('\n  ...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def pypyraises(space, w_ExpectedException, w_expr=None, __args__=None):
        """A built-in function providing the equivalent of py.test.raises()."""
        if w_expr is None:
            return W_RaisesContextManager(space, w_ExpectedException)
        args_w, kwds_w = __args__.unpack()
        if space.isinstance_w(w_expr, space.w_text):
            if args_w:
                raise oefmt(space.w_TypeError,
                            "raises() takes no argument after a string expression")
            expr = space.unwrap(w_expr)
            source = py.code.Source(expr)
            frame = space.getexecutioncontext().gettopframe()
            w_locals = frame.getdictscope()
            pycode = frame.pycode
            filename = "<%s:%s>" %(pycode.co_filename,
                                   space.int_w(frame.fget_f_lineno(space)))
            lines = [x + "\n" for x in expr.split("\n")]
            py.std.linecache.cache[filename] = (1, None, lines, filename)
            w_locals = space.call_method(w_locals, 'copy')
            for key, w_value in kwds_w.items():
                space.setitem(w_locals, space.wrap(key), w_value)
            #filename = __file__
            #if filename.endswith("pyc"):
            #    filename = filename[:-1]
            try:
                space.exec_(unicode(source).encode('utf-8'), frame.get_w_globals(),
                            w_locals, filename=filename)
            except OperationError as e:
                if e.match(space, w_ExpectedException):
                    return _exc_info(space, e)
                raise
        else:
            try:
>               space.call_args(w_expr, __args__)

tool/pytest/appsupport.py:298: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

space = StdObjSpace, w_obj = <FunctionWithFixedCode import_module>
args = Arguments([], ['name', 'init'], [W_UnicodeObject('foo'), W_UnicodeObject('\n  ...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def call_args(space, w_obj, args):
        # two special cases for performance
        if isinstance(w_obj, Function):
>           return w_obj.call_args(args)

objspace/descroperation.py:192: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <FunctionWithFixedCode import_module>
args = Arguments([], ['name', 'init'], [W_UnicodeObject('foo'), W_UnicodeObject('\n  ...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def call_args(self, args):
        # delegate activation to code
>       w_res = self.getcode().funcrun(self, args)

interpreter/function.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x000000014ac4b328>
func = <FunctionWithFixedCode import_module>
args = Arguments([], ['name', 'init'], [W_UnicodeObject('foo'), W_UnicodeObject('\n  ...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def funcrun(self, func, args):
>       return BuiltinCode.funcrun_obj(self, func, None, args)

interpreter/gateway.py:869: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x000000014ac4b328>
func = <FunctionWithFixedCode import_module>, w_obj = None
args = Arguments([], ['name', 'init'], [W_UnicodeObject('foo'), W_UnicodeObject('\n  ...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def funcrun_obj(self, func, w_obj, args):
        space = func.space
        activation = self.activation
    
        scope_w = args.parse_obj(w_obj, func.qualname, self.sig,
                                 func.defs_w, func.w_kw_defs, self.minargs)
        try:
            w_result = activation._run(space, scope_w)
        except DescrMismatch:
            if w_obj is not None:
                args = args.prepend(w_obj)
            return self._type_unwrap_mismatch(space, args)
        except Exception as e:
>           self.handle_exception(space, e)

interpreter/gateway.py:884: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x000000014ac4b328>
space = StdObjSpace
e = CompileError(DistutilsExecError("command 'cc' terminated by signal 10",),)

    def handle_exception(self, space, e):
        try:
            if not we_are_translated():
                raise
            raise e
        except OperationError:
            raise
        except Exception as e:      # general fall-back
            from pypy.interpreter import error
>           raise error.get_converted_unexpected_exception(space, e)

interpreter/gateway.py:908: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x000000014ac4b328>
func = <FunctionWithFixedCode import_module>, w_obj = None
args = Arguments([], ['name', 'init'], [W_UnicodeObject('foo'), W_UnicodeObject('\n  ...Err_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        ')])

    def funcrun_obj(self, func, w_obj, args):
        space = func.space
        activation = self.activation
    
        scope_w = args.parse_obj(w_obj, func.qualname, self.sig,
                                 func.defs_w, func.w_kw_defs, self.minargs)
        try:
>           w_result = activation._run(space, scope_w)

interpreter/gateway.py:878: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinActivation_UwS_ObjSpace_text_text_or_none_text_fsencode_or_none_W_Root_bool_bool object at 0x000000014ac4b980>
space = StdObjSpace
scope_w = [W_UnicodeObject('foo'), W_UnicodeObject('\n            PyErr_SetString(PyExc_Exception, "moo!");\n            return ...deObject(''), <pypy.objspace.std.noneobject.W_NoneObject object at 0x0000000130bbbc90>, None, W_BoolObject(False), ...]

    def _run(self, space, scope_w):
>       return self.behavior(space, space.text_w(scope_w[0]), space.text_or_none_w(scope_w[1]), space.text_w(scope_w[2]), space.fsencode_or_none_w(scope_w[3]), scope_w[4], space.is_true(scope_w[5]), space.is_true(scope_w[6]))

<2700-codegen /Users/matti/build-worker-arm64/own-macos-arm64/build/rpython/tool/sourcetools.py:200>:3: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

space = StdObjSpace, name = 'foo'
init = '\n            PyErr_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        '
body = '', filename = None, w_include_dirs = None, PY_SSIZE_T_CLEAN = False
use_imp = False

    @unwrap_spec(name='text', init='text_or_none', body='text',
                 filename='fsencode_or_none', PY_SSIZE_T_CLEAN=bool,
                 use_imp=bool)
    def import_module(space, name, init=None, body='',
                      filename=None, w_include_dirs=None,
                      PY_SSIZE_T_CLEAN=False, use_imp=False):
        include_dirs = _unwrap_include_dirs(space, w_include_dirs)
        # For file-based imports (no inline code), reuse the previously
        # loaded module from our own cache -- avoids re-running PyInit_xxx
        # (the expensive part) on every test in the class.
        # We use a separate cache (not sys.modules) so that an
        # import_extension() call with the same name doesn't shadow the
        # file-based module.
        if init is None and not body:
            if name in self._file_module_cache:
                self.record_imported_module(name)
                return self._file_module_cache[name]
            # About to overwrite sys.modules[name] -- save the displaced
            # module (if any) so that its raw allocations aren't freed
            # during a later test's leakfinder tracking window.
            w_modules = space.sys.get('modules')
            try:
                w_old = space.getitem(w_modules, space.newtext(name))
                self._module_keepalive.append(w_old)
            except OperationError:
                pass
        w_result = self.sys_info.import_module(
            name, init, body, filename, include_dirs, PY_SSIZE_T_CLEAN,
>           use_imp)

module/cpyext/test/test_cpyext.py:384: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.module.cpyext.test.test_cpyext.SpaceCompiler object at 0x0000000131838090>
name = 'foo'
init = '\n            PyErr_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        '
body = '', filename = None, include_dirs = None, PY_SSIZE_T_CLEAN = False
use_imp = False

    def import_module(self, name, init=None, body='', filename=None,
                      include_dirs=None, PY_SSIZE_T_CLEAN=False, use_imp=False):
        """
            init specifies the overall template of the module.
    
            if init is None, the module source will be loaded from a file in this
            test directory, give a name given by the filename parameter.
    
            if filename is None, the module name will be used to construct the
            filename.
            """
        if body or init:
            if init is None:
                init = "return PyModule_Create(&moduledef);"
        if init is not None:
            code = make_source(name, init, body, PY_SSIZE_T_CLEAN)
            kwds = dict(source_strings=[code])
        else:
            assert not PY_SSIZE_T_CLEAN
            if filename is None:
                filename = name
            filename = HERE / (filename + ".c")
            kwds = dict(source_files=[filename])
        mod = self.compile_extension_module(
>           name, include_dirs=include_dirs, **kwds)

tool/cpyext/extbuild.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.module.cpyext.test.test_cpyext.SpaceCompiler object at 0x0000000131838090>
name = 'foo', include_dirs = []
source_files = [local('/tmp/buildbot-arm64/usession-py3.11-2182/foo-8/source_0.c')]
source_strings = ['\n    \n    #include <Python.h>\n\n    \n\n    PyMODINIT_FUNC\n    PyInit_foo(void) {\n    \n            PyErr_SetString(PyExc_Exception, "moo!");\n            return NULL;\n        \n    }\n    ']

    def compile_extension_module(self, name, include_dirs=None,
            source_files=None, source_strings=None):
        """
            Build an extension module and return the filename of the resulting
            native code file.
    
            name is the name of the module, possibly including dots if it is a
            module inside a package.
            """
        include_dirs = include_dirs or []
        modname = name.split('.')[-1]
        dirname = self.get_builddir(name=modname)
        if source_strings:
            assert not source_files
            files = convert_sources_to_files(source_strings, dirname)
            source_files = files
        soname = c_compile(source_files, outputfilename=str(dirname / modname),
            compile_extra=self.compile_extra,
            link_extra=self.link_extra,
            include_dirs=self.include_extra + include_dirs,
>           libraries=self.extra_libs)

tool/cpyext/extbuild.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cfilenames = [local('/tmp/buildbot-arm64/usession-py3.11-2182/foo-8/source_0.c')]
outputfilename = local('/tmp/buildbot-arm64/usession-py3.11-2182/foo-8/foo.so')
compile_extra = [], link_extra = []
include_dirs = [local('/tmp/buildbot-arm64/usession-py3.11-2182'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/.../build/pypy/module/cpyext/parse'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/rpython/translator/c')]
libraries = [], library_dirs = []

    def c_compile(cfilenames, outputfilename,
            compile_extra=None, link_extra=None,
            include_dirs=None, libraries=None, library_dirs=None):
        compile_extra = compile_extra or []
        link_extra = link_extra or []
        include_dirs = include_dirs or []
        libraries = libraries or []
        library_dirs = library_dirs or []
        if sys.platform == 'win32':
            link_extra = link_extra + ['/DEBUG']  # generate .pdb file
        if sys.platform == 'darwin':
            # support Fink & Darwinports
            for s in ('/sw/', '/opt/local/'):
                if (s + 'include' not in include_dirs
                        and os.path.exists(s + 'include')):
                    include_dirs.append(s + 'include')
                if s + 'lib' not in library_dirs and os.path.exists(s + 'lib'):
                    library_dirs.append(s + 'lib')
    
        outputfilename = py.path.local(outputfilename).new(ext=so_ext)
        saved_environ = os.environ.copy()
        try:
            _build(
                cfilenames, outputfilename,
                compile_extra, link_extra,
>               include_dirs, libraries, library_dirs)

tool/cpyext/extbuild.py:200: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cfilenames = [local('/tmp/buildbot-arm64/usession-py3.11-2182/foo-8/source_0.c')]
outputfilename = local('/tmp/buildbot-arm64/usession-py3.11-2182/foo-8/foo.so')
compile_extra = [], link_extra = []
include_dirs = [local('/tmp/buildbot-arm64/usession-py3.11-2182'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/.../build/pypy/module/cpyext/parse'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/rpython/translator/c')]
libraries = [], library_dirs = []

    def _build(cfilenames, outputfilename, compile_extra, link_extra,
            include_dirs, libraries, library_dirs):
        try:
            # monkeypatch distutils for some versions of msvc compiler
            import setuptools
        except ImportError:
            # XXX if this fails and is required,
            #     we must call pypy -mensurepip after translation
            pass
        from distutils.ccompiler import new_compiler
        from distutils import sysconfig
    
        # XXX for Darwin running old versions of CPython 2.7.x
        sysconfig.get_config_vars()
    
        compiler = new_compiler(force=1)
        sysconfig.customize_compiler(compiler)  # XXX
        objects = []
        for cfile in cfilenames:
            cfile = py.path.local(cfile)
            old = cfile.dirpath().chdir()
            try:
                res = compiler.compile([cfile.basename],
>                   include_dirs=include_dirs, extra_preargs=compile_extra)

tool/cpyext/extbuild.py:232: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <distutils.unixccompiler.UnixCCompiler instance at 0x0000000112f693e0>
sources = ['source_0.c'], output_dir = None, macros = []
include_dirs = [local('/tmp/buildbot-arm64/usession-py3.11-2182'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/.../build/pypy/module/cpyext/parse'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/rpython/translator/c')]
debug = 0, extra_preargs = [], extra_postargs = [], depends = None

    def compile(self, sources, output_dir=None, macros=None,
                include_dirs=None, debug=0, extra_preargs=None,
                extra_postargs=None, depends=None):
        """Compile one or more source files.
    
            'sources' must be a list of filenames, most likely C/C++
            files, but in reality anything that can be handled by a
            particular compiler and compiler class (eg. MSVCCompiler can
            handle resource files in 'sources').  Return a list of object
            filenames, one per source filename in 'sources'.  Depending on
            the implementation, not all source files will necessarily be
            compiled, but all corresponding object filenames will be
            returned.
    
            If 'output_dir' is given, object files will be put under it, while
            retaining their original path component.  That is, "foo/bar.c"
            normally compiles to "foo/bar.o" (for a Unix implementation); if
            'output_dir' is "build", then it would compile to
            "build/foo/bar.o".
    
            'macros', if given, must be a list of macro definitions.  A macro
            definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
            The former defines a macro; if the value is None, the macro is
            defined without an explicit value.  The 1-tuple case undefines a
            macro.  Later definitions/redefinitions/ undefinitions take
            precedence.
    
            'include_dirs', if given, must be a list of strings, the
            directories to add to the default include file search path for this
            compilation only.
    
            'debug' is a boolean; if true, the compiler will be instructed to
            output debug symbols in (or alongside) the object file(s).
    
            'extra_preargs' and 'extra_postargs' are implementation- dependent.
            On platforms that have the notion of a command-line (e.g. Unix,
            DOS/Windows), they are most likely lists of strings: extra
            command-line arguments to prepand/append to the compiler command
            line.  On other platforms, consult the implementation class
            documentation.  In any event, they are intended as an escape hatch
            for those occasions when the abstract compiler framework doesn't
            cut the mustard.
    
            'depends', if given, is a list of filenames that all targets
            depend on.  If a source file is older than any file in
            depends, then the source file will be recompiled.  This
            supports dependency tracking, but only at a coarse
            granularity.
    
            Raises CompileError on failure.
            """
        # A concrete compiler class can either override this method
        # entirely or implement _compile().
    
        macros, objects, extra_postargs, pp_opts, build = \
                self._setup_compile(output_dir, macros, include_dirs, sources,
                                    depends, extra_postargs)
        cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
    
        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
>           self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)

../../../../oss/pypy-arm64-buildbot/lib-python/2.7/distutils/ccompiler.py:574: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <distutils.unixccompiler.UnixCCompiler instance at 0x0000000112f693e0>
obj = 'source_0.o', src = 'source_0.c', ext = '.c'
cc_args = ['-I/tmp/buildbot-arm64/usession-py3.11-2182', '-I/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cp.../build/pypy/module/cpyext/parse', '-I/Users/matti/build-worker-arm64/own-macos-arm64/build/rpython/translator/c', '-c']
extra_postargs = []
pp_opts = ['-I/tmp/buildbot-arm64/usession-py3.11-2182', '-I/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cp...-arm64/build/pypy/module/cpyext/parse', '-I/Users/matti/build-worker-arm64/own-macos-arm64/build/rpython/translator/c']

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        compiler_so = self.compiler_so
        if sys.platform == 'darwin':
            compiler_so = _osx_support.compiler_fixup(compiler_so,
                                                    cc_args + extra_postargs)
        try:
            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
                       extra_postargs)
        except DistutilsExecError, msg:
>           raise CompileError, msg
E           CompileError: command 'cc' terminated by signal 10

../../../../oss/pypy-arm64-buildbot/lib-python/2.7/distutils/unixccompiler.py:139: CompileError
builder: own-macos-arm64 build #1270+
test: pypy/module/cpyext/test/test_cpyext.py::AppTestCpythonExtension::()::test_init_exception