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

pypy/module/cpyext/test/test_memoryobject.py::AppTestBufferProtocol::()::test_buffer_protocol_capi

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

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

../_pytest/runner.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>       lambda: ihook(item=item, **kwds),
        when=when,
        treat_keyboard_interrupt_as_exception=item.config.getvalue("usepdb"),
    )

../_pytest/runner.py:194: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_HookCaller 'pytest_runtest_call'>, args = ()
kwargs = {'item': <AppTestMethod 'test_buffer_protocol_capi'>}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.spec and self.spec.argnames:
            notincall = (
                set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
            )
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call".format(tuple(notincall)),
                    stacklevel=2,
                )
>       return self._hookexec(self, self.get_hookimpls(), kwargs)

../_pytest/vendored_packages/pluggy/hooks.py:289: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.config.PytestPluginManager object at 0x000000014006e6e8>
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<HookImpl plugin_name='4990390368', plugin=<rpython.conftest.LeakFinder instance at 0x0000000129735060>>, <HookImpl p...9b2cd0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x0000000129757600>>]
kwargs = {'item': <AppTestMethod 'test_buffer_protocol_capi'>}

    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/manager.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = <_HookCaller 'pytest_runtest_call'>
methods = [<HookImpl plugin_name='4990390368', plugin=<rpython.conftest.LeakFinder instance at 0x0000000129735060>>, <HookImpl p...9b2cd0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x0000000129757600>>]
kwargs = {'item': <AppTestMethod 'test_buffer_protocol_capi'>}

    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
        methods,
        kwargs,
>       firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    )

../_pytest/vendored_packages/pluggy/manager.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook_impls = [<HookImpl plugin_name='4990390368', plugin=<rpython.conftest.LeakFinder instance at 0x0000000129735060>>, <HookImpl p...9b2cd0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x0000000129757600>>]
caller_kwargs = {'item': <AppTestMethod 'test_buffer_protocol_capi'>}
firstresult = False

    def _multicall(hook_impls, caller_kwargs, firstresult=False):
        """Execute a call into multiple python functions/methods and return the
        result(s).
    
        ``caller_kwargs`` comes from _HookCaller.__call__().
        """
        __tracebackhide__ = True
        results = []
        excinfo = None
        try:  # run impl and wrapper setup functions in a loop
            teardowns = []
            try:
                for hook_impl in reversed(hook_impls):
                    try:
                        args = [caller_kwargs[argname] for argname in hook_impl.argnames]
                    except KeyError:
                        for argname in hook_impl.argnames:
                            if argname not in caller_kwargs:
                                raise HookCallError(
                                    "hook call must provide argument %r" % (argname,)
                                )
    
                    if hook_impl.hookwrapper:
                        try:
                            gen = hook_impl.function(*args)
                            next(gen)  # first yield
                            teardowns.append(gen)
                        except StopIteration:
                            _raise_wrapfail(gen, "did not yield")
                    else:
                        res = hook_impl.function(*args)
                        if res is not None:
                            results.append(res)
                            if firstresult:  # halt further impl calls
                                break
            except BaseException:
                excinfo = sys.exc_info()
        finally:
            if firstresult:  # first result hooks return a single value
                outcome = _Result(results[0] if results else None, excinfo)
            else:
                outcome = _Result(results, excinfo)
    
            # run all wrapper post-yield blocks
            for gen in reversed(teardowns):
                try:
                    gen.send(outcome)
                    _raise_wrapfail(gen, "has second yield")
                except StopIteration:
                    pass
    
>           return outcome.get_result()

../_pytest/vendored_packages/pluggy/callers.py:208: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pluggy.callers._Result object at 0x00000001482ce480>

    def get_result(self):
        """Get the result(s) for this hook call.
    
        If the hook was marked as a ``firstresult`` only a single value
        will be returned otherwise a list of results.
        """
        __tracebackhide__ = True
        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/callers.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook_impls = [<HookImpl plugin_name='4990390368', plugin=<rpython.conftest.LeakFinder instance at 0x0000000129735060>>, <HookImpl p...9b2cd0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x0000000129757600>>]
caller_kwargs = {'item': <AppTestMethod 'test_buffer_protocol_capi'>}
firstresult = False

    def _multicall(hook_impls, caller_kwargs, firstresult=False):
        """Execute a call into multiple python functions/methods and return the
        result(s).
    
        ``caller_kwargs`` comes from _HookCaller.__call__().
        """
        __tracebackhide__ = True
        results = []
        excinfo = None
        try:  # run impl and wrapper setup functions in a loop
            teardowns = []
            try:
                for hook_impl in reversed(hook_impls):
                    try:
                        args = [caller_kwargs[argname] for argname in hook_impl.argnames]
                    except KeyError:
                        for argname in hook_impl.argnames:
                            if argname not in caller_kwargs:
                                raise HookCallError(
                                    "hook call must provide argument %r" % (argname,)
                                )
    
                    if hook_impl.hookwrapper:
                        try:
                            gen = hook_impl.function(*args)
                            next(gen)  # first yield
                            teardowns.append(gen)
                        except StopIteration:
                            _raise_wrapfail(gen, "did not yield")
                    else:
>                       res = hook_impl.function(*args)

../_pytest/vendored_packages/pluggy/callers.py:187: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = <AppTestMethod 'test_buffer_protocol_capi'>

    def pytest_runtest_call(item):
        _update_current_test_var(item, "call")
        sys.last_type, sys.last_value, sys.last_traceback = (None, None, None)
        try:
>           item.runtest()

../_pytest/runner.py:122: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AppTestMethod 'test_buffer_protocol_capi'>

    def runtest(self):
        target = self.obj
        if self.config.option.runappdirect:
            return target()
        space = target.im_self.space
        filename = self._getdynfilename(target)
        func = app2interp_temp(target.im_func, filename=filename)
        w_instance = self.parent.w_instance
>       self.execute_appex(space, func, space, w_instance)

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

self = <AppTestMethod 'test_buffer_protocol_capi'>, space = StdObjSpace
target = <function test_buffer_protocol_capi at 0x00000001410b13d0>
args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000000148251408>)

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

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

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

    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:1227: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = StdObjSpace, w_func = <Function test_buffer_protocol_capi>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000000148251408>,)
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):
                w_inst = w_func.w_instance
                if w_inst is not None:
                    if nargs < 4:
                        func = w_func.w_function
                        if isinstance(func, Function):
                            return func.funccall(w_inst, *args_w)
                elif args_w and (
                        self.abstract_isinstance_w(args_w[0], w_func.w_class)):
                    w_func = w_func.w_function
    
            if isinstance(w_func, Function):
>               return w_func.funccall(*args_w)

interpreter/baseobjspace.py:1210: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Function test_buffer_protocol_capi>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000000148251408>,)
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_buffer_protocol_capi, file '[/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', 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()

interpreter/function.py:118: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_p...64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1> at line 72

    def run(self):
        """Start this frame's execution."""
        if self.getcode().co_flags & pycode.CO_GENERATOR:
            from pypy.interpreter.generator import GeneratorIterator
            return GeneratorIterator(self)
        else:
>           return self.execute_frame()

interpreter/pyframe.py:253: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_p...64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1> at line 72
w_inputvalue = None, operr = None

    def execute_frame(self, w_inputvalue=None, operr=None):
        """Execute this frame.  Main entry point to the interpreter.
        The optional arguments are there to handle a generator's frame:
        w_inputvalue is for generator.send() and operr is for
        generator.throw().
        """
        # 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)
            #
            try:
                if operr is not None:
                    next_instr = self.handle_operation_error(
                            executioncontext, operr)
                    self.last_instr = intmask(next_instr - 1)
                else:
                    # Execution starts just after the last_instr.  Initially,
                    # last_instr is -1.  After a generator suspends it points to
                    # the YIELD_VALUE instruction.
                    next_instr = r_uint(self.last_instr + 1)
                    if next_instr != 0:
                        self.pushvalue(w_inputvalue)
                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:290: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_p...64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1> at line 72
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:943: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_p...64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1> at line 72
w_inputvalue = None, operr = None

    def execute_frame(self, w_inputvalue=None, operr=None):
        """Execute this frame.  Main entry point to the interpreter.
        The optional arguments are there to handle a generator's frame:
        w_inputvalue is for generator.send() and operr is for
        generator.throw().
        """
        # 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)
            #
            try:
                if operr is not None:
                    next_instr = self.handle_operation_error(
                            executioncontext, operr)
                    self.last_instr = intmask(next_instr - 1)
                else:
                    # Execution starts just after the last_instr.  Initially,
                    # last_instr is -1.  After a generator suspends it points to
                    # the YIELD_VALUE instruction.
                    next_instr = r_uint(self.last_instr + 1)
                    if next_instr != 0:
                        self.pushvalue(w_inputvalue)
                w_exitvalue = self.dispatch(self.pycode, next_instr,
>                                           executioncontext)

interpreter/pyframe.py:286: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_p...64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1> at line 72
pycode = <code object test_buffer_protocol_capi, file '[/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1>
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00000001394a7408>

    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:
>               next_instr = self.handle_bytecode(co_code, next_instr, ec)

interpreter/pyopcode.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_p...64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1> at line 72
co_code = '|\x00\x00\xc9\x00\x00d\x01\x00d\x02\x00d\x03\x00d\x04\x00d\x05\x00d\x06\x00g\x05\x00\xca\x02\x00}\x01\x00|\x00\x00\xc...x01\x00\x01|\x01\x00\xc9\x07\x00|\x08\x00\xca\x01\x00}\x05\x00|\x01\x00\xc9\x06\x00|\x05\x00\xca\x01\x00\x01d\x00\x00S'
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00000001394a7408>

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

interpreter/pyopcode.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_p...64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1> at line 72
co_code = '|\x00\x00\xc9\x00\x00d\x01\x00d\x02\x00d\x03\x00d\x04\x00d\x05\x00d\x06\x00g\x05\x00\xca\x02\x00}\x01\x00|\x00\x00\xc...x01\x00\x01|\x01\x00\xc9\x07\x00|\x08\x00\xca\x01\x00}\x05\x00|\x01\x00\xc9\x06\x00|\x05\x00\xca\x01\x00\x01d\x00\x00S'
next_instr = 48L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00000001394a7408>

    @jit.unroll_safe
    def dispatch_bytecode(self, co_code, next_instr, ec):
        while True:
            self.last_instr = intmask(next_instr)
            if jit.we_are_jitted():
                if self.debugdata:
                    ec.bytecode_only_trace(self)
                    next_instr = r_uint(self.last_instr)
            else:
                ec.bytecode_trace(self)
                next_instr = r_uint(self.last_instr)
            opcode = ord(co_code[next_instr])
            next_instr += 1
    
            if opcode >= HAVE_ARGUMENT:
                lo = ord(co_code[next_instr])
                hi = ord(co_code[next_instr+1])
                next_instr += 2
                oparg = (hi * 256) | lo
            else:
                oparg = 0
    
            # note: the structure of the code here is such that it makes
            # (after translation) a big "if/elif" chain, which is then
            # turned into a switch().
    
            while opcode == opcodedesc.EXTENDED_ARG.index:
                opcode = ord(co_code[next_instr])
                if opcode < HAVE_ARGUMENT:
                    raise BytecodeCorruption
                lo = ord(co_code[next_instr+1])
                hi = ord(co_code[next_instr+2])
                next_instr += 3
                oparg = (oparg * 65536) | (hi * 256) | lo
    
            if opcode == opcodedesc.RETURN_VALUE.index:
                if not self.blockstack_non_empty():
                    self.frame_finished_execution = True  # for generators
                    raise Return
                w_returnvalue = self.popvalue()
                block = self.unrollstack(SReturnValue.kind)
                if block is None:
                    self.pushvalue(w_returnvalue)
                    raise Return
                else:
                    unroller = SReturnValue(w_returnvalue)
                    next_instr = block.handle(self, unroller)
                    return next_instr    # now inside a 'finally' block
            elif opcode == opcodedesc.END_FINALLY.index:
                unroller = self.end_finally()
                if isinstance(unroller, SuspendedUnroller):
                    # go on unrolling the stack
                    block = self.unrollstack(unroller.kind)
                    if block is None:
                        w_result = unroller.nomoreblocks()
                        self.pushvalue(w_result)
                        raise Return
                    else:
                        next_instr = block.handle(self, unroller)
                return next_instr
            elif opcode == opcodedesc.JUMP_ABSOLUTE.index:
                return self.jump_absolute(oparg, ec)
            elif opcode == opcodedesc.BREAK_LOOP.index:
                next_instr = self.BREAK_LOOP(oparg, next_instr)
            elif opcode == opcodedesc.CONTINUE_LOOP.index:
                return self.CONTINUE_LOOP(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:
                next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr)
            elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index:
                next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr)
            elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index:
                next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr)
            elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index:
                next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr)
            elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index:
                next_instr = self.POP_JUMP_IF_TRUE(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_DIVIDE.index:
                self.BINARY_DIVIDE(oparg, next_instr)
            elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index:
                self.BINARY_FLOOR_DIVIDE(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_CLASS.index:
                self.BUILD_CLASS(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)
            elif opcode == opcodedesc.CALL_FUNCTION_VAR.index:
                self.CALL_FUNCTION_VAR(oparg, next_instr)
            elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index:
                self.CALL_FUNCTION_VAR_KW(oparg, next_instr)
            elif opcode == opcodedesc.CALL_METHOD.index:
>               self.CALL_METHOD(oparg, next_instr)

interpreter/pyopcode.py:276: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_p...64/build/pypy/module/cpyext/test/test_memoryobject.py:110]', line 1> at line 72
oparg = 256, ignored = (48L,), n_args = 0, n_kwargs = -1, w_self = None

    @jit.unroll_safe
    def CALL_METHOD(f, oparg, *ignored):
        # opargs contains the arg, and kwarg count, excluding the implicit 'self'
        n_args = oparg & 0xff
        n_kwargs = (oparg >> 8) & 0xff
        w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs))
        n = n_args + (w_self is not None)
    
        if not n_kwargs:
            w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1)
            w_result = f.space.call_valuestack(
                w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2)
        else:
            keywords = [None] * n_kwargs
            keywords_w = [None] * n_kwargs
            while True:
                n_kwargs -= 1
                if n_kwargs < 0:
                    break
                w_value = f.popvalue()
                w_key = f.popvalue()
                key = f.space.text_w(w_key)
                keywords[n_kwargs] = key
                keywords_w[n_kwargs] = w_value
    
            arguments = f.popvalues(n)    # includes w_self if it is not None
            args = f.argument_factory(
                    arguments, keywords, keywords_w, None, None,
                    methodcall=w_self is not None)
            if w_self is None:
                f.popvalue_maybe_none()    # removes w_self, which is None
            w_callable = f.popvalue()
            if f.get_is_being_profiled() and function.is_builtin_code(w_callable):
                w_result = f.space.call_args_and_c_profile(f, w_callable, args)
            else:
>               w_result = f.space.call_args(w_callable, args)

objspace/std/callmethod.py:120: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

space = StdObjSpace, w_obj = <FunctionWithFixedCode import_module>
args = Arguments([], ['name'], [W_BytesObject('buffer_test')])

    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:186: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <FunctionWithFixedCode import_module>
args = Arguments([], ['name'], [W_BytesObject('buffer_test')])

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

interpreter/function.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x0000000140b42608>
func = <FunctionWithFixedCode import_module>
args = Arguments([], ['name'], [W_BytesObject('buffer_test')])

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

interpreter/gateway.py:781: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x0000000140b42608>
func = <FunctionWithFixedCode import_module>, w_obj = None
args = Arguments([], ['name'], [W_BytesObject('buffer_test')])

    def funcrun_obj(self, func, w_obj, args):
        space = func.space
        activation = self.activation
        scope_w = args.parse_obj(w_obj, func.name, self.sig,
                                 func.defs_w, 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:795: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x0000000140b42608>
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:819: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinCode object at 0x0000000140b42608>
func = <FunctionWithFixedCode import_module>, w_obj = None
args = Arguments([], ['name'], [W_BytesObject('buffer_test')])

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

interpreter/gateway.py:789: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.gateway.BuiltinActivation_UwS_ObjSpace_text_text_or_none_text_fsencode_or_none_W_Root_bool object at 0x0000000140b42720>
space = StdObjSpace
scope_w = [W_BytesObject('buffer_test'), <pypy.objspace.std.noneobject.W_NoneObject object at 0x0000000119244d40>, W_BytesObject(''), <pypy.objspace.std.noneobject.W_NoneObject object at 0x0000000119244d40>, 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.bool_w(scope_w[5]))

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

space = StdObjSpace, name = 'buffer_test', init = None, body = ''
filename = None, w_include_dirs = None, PY_SSIZE_T_CLEAN = False

    @unwrap_spec(name='text', init='text_or_none', body='text',
                 filename='fsencode_or_none', PY_SSIZE_T_CLEAN=bool)
    def import_module(space, name, init=None, body='',
                      filename=None, w_include_dirs=None,
                      PY_SSIZE_T_CLEAN=False):
        include_dirs = _unwrap_include_dirs(space, w_include_dirs)
        w_result = self.sys_info.import_module(
>           name, init, body, filename, include_dirs, PY_SSIZE_T_CLEAN)

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

self = <pypy.module.cpyext.test.test_cpyext.SpaceCompiler object at 0x00000001482517c0>
name = 'buffer_test', init = None, body = ''
filename = local('/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cpyext/test/buffer_test.c')
include_dirs = None, PY_SSIZE_T_CLEAN = False

    def import_module(self, name, init=None, body='', filename=None,
            include_dirs=None, PY_SSIZE_T_CLEAN=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 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:80: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.module.cpyext.test.test_cpyext.SpaceCompiler object at 0x00000001482517c0>
name = 'buffer_test', include_dirs = []
source_files = [local('/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cpyext/test/buffer_test.c')]
source_strings = None

    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('/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cpyext/test/buffer_test.c')]
outputfilename = local('/tmp/buildbot-arm64/usession-pytest3.10-621/buffer_test-1/buffer_test.so')
compile_extra = [], link_extra = []
include_dirs = [local('/tmp/buildbot-arm64/usession-pytest3.10-621'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/py.../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:191: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cfilenames = [local('/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/cpyext/test/buffer_test.c')]
outputfilename = local('/tmp/buildbot-arm64/usession-pytest3.10-621/buffer_test-1/buffer_test.so')
compile_extra = [], link_extra = []
include_dirs = [local('/tmp/buildbot-arm64/usession-pytest3.10-621'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/py.../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:223: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <distutils.unixccompiler.UnixCCompiler instance at 0x0000000119b391a0>
sources = ['buffer_test.c'], output_dir = None, macros = []
include_dirs = [local('/tmp/buildbot-arm64/usession-pytest3.10-621'), local('/Users/matti/build-worker-arm64/own-macos-arm64/build/py.../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 0x0000000119b391a0>
obj = 'buffer_test.o', src = 'buffer_test.c', ext = '.c'
cc_args = ['-I/tmp/buildbot-arm64/usession-pytest3.10-621', '-I/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module.../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-pytest3.10-621', '-I/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module...-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 #1214+
test: pypy/module/cpyext/test/test_memoryobject.py::AppTestBufferProtocol::()::test_buffer_protocol_capi