jwilk / python-afl

American Fuzzy Lop fork server and instrumentation for pure-Python code
https://jwilk.net/software/python-afl
MIT License
350 stars 33 forks source link

Fails to build with Cython 3.0.0b3: Cannot assign type 'sighandler_t' to 'void (*)(int) noexcept' #29

Closed ghost closed 1 year ago

ghost commented 1 year ago

I get this error when trying to install python-afl with python3.9.6

Error compiling Cython file:
------------------------------------------------------------
...
    init_done = True
    child_stopped = False
    child_pid = 0
    cdef sigaction_t old_sigchld
    cdef sigaction_t dfl_sigchld
    dfl_sigchld.sa_handler = SIG_DFL
                             ^
------------------------------------------------------------

afl.pyx:145:29: Cannot assign type 'sighandler_t' to 'void (*)(int) noexcept'
Traceback (most recent call last):
  File "/home/ret/python-afl/setup.py", line 134, in <module>
    ext_modules=Cython.Build.cythonize('afl.pyx'),
  File "/usr/local/lib/python3.9/site-packages/Cython-3.0.0rc1.dev0-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py", line 1134, in cythonize
    cythonize_one(*args)
  File "/usr/local/lib/python3.9/site-packages/Cython-3.0.0rc1.dev0-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py", line 1301, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: afl.pyx
jwilk commented 1 year ago

I can reproduce this with Cython 3.0.0b3, but not with earlier versions.

Smells like a Cython bug. I will investigate further.

jwilk commented 1 year ago

This was fixed in Cython 3.0.0rc1.