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

Address boundary error #6

Closed
WeirdCarrotMonster opened this issue Aug 1, 2016 · 2 comments
Closed

Address boundary error #6

WeirdCarrotMonster opened this issue Aug 1, 2016 · 2 comments

Comments

@WeirdCarrotMonster
Copy link

Python 3.5.2, multidict-2.0.0 from PyPI, following code fails with SIGSEGV:

from multidict import MultiDict
set() - MultiDict().keys()

If i understood correctly, error happens in PyAnySet_Check call, since set substraction is basically difference method call with type check:

if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) {
    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}
return set_difference(so, other);

It also can be reproduced with dict and list objects, so i think problem may be related to type checking.

@asvetlov
Copy link
Member

asvetlov commented Aug 1, 2016

Good catch!
Would you provide a Pull Request with fix?

asvetlov added a commit that referenced this issue Aug 2, 2016
@asvetlov
Copy link
Member

asvetlov commented Aug 2, 2016

Fixed in both multidict==1.2.2 and multidict==2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants