Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault with async function with kwargs #3181

Open
chasezheng opened this issue Oct 12, 2019 · 1 comment

Comments

@chasezheng
Copy link

@chasezheng chasezheng commented Oct 12, 2019

Hi Cython team,
I ran into this issue today. Let me know what if this is reproducible on your side.

Steps to reproduce:

async def f(**kwargs):
    return

f()
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

Versions:
python=3.7
cython=0.29.13

@chasezheng

This comment has been minimized.

Copy link
Author

@chasezheng chasezheng commented Nov 8, 2019

I did some digging and here's what I found -- if the kwargs are mentioned in the function, the segfault doesn't happen. For instance, this is fine:

async def f(**kwargs):
    a = kwargs

Generated C snippets:
segfault.txt
no-segfault.txt

The reason I found this bug is because I want to do something like this:

def decorator(func):
    async def wrapper(*args, **kwargs):
        return await func(*args, **kwargs)
    return wrapper

which unfortunately would crash.

@scoder Any help would be appreciated, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.