Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 675
    • Issues 675
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPyPyPy
  • pypypypy
  • Issues
  • #2142
Closed
Open
Issue created Sep 22, 2015 by Bitbucket Importer@bitbucket_importerMaintainer

cpyext-driven crash when using cython - NotImplementedError when using __sub__

Created originally on Bitbucket by crepererum (Marco Neumann)

Environment

foo.pyx:

#!python

cdef class C:
    def __cinit__(self):
        pass

    def __sub__(self, o):
        return 0

test.py:

#!python

import foo
a = foo.C()
b = foo.C()
a - b

cython --version:

#!

Cython version 0.23.2

pypy --version:

#!

Python 2.7.10 (f3ad1e1e1d62, Sep 07 2015, 21:46:51)
[PyPy 2.6.1 with GCC 5.2.0]

gcc --version:

#!

gcc (GCC) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Steps to reproduce

#!

cython foo.pyx
gcc -shared -IPATH/TO/YOUR/PYPY/INCLUDE -fPIC foo.c -o foo.pypy-26.so
pypy test.py

Result

#!

RPython traceback:
  File "pypy_interpreter_gateway.c", line 812, in BuiltinCodePassThroughArguments1_funcrun_obj
  File "pypy_module_cpyext_slotdefs.c", line 2661, in wrap_binaryfunc_l_11
Fatal RPython error: NotImplementedError
fish: “pypy test.py” terminated by signal SIGABRT (Abort)

References

This bug mentioned here: https://groups.google.com/forum/#!topic/cython-users/Nm56Ow-toQw

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking