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

repr(CIMultiDictProxy(CIMultiDict())) clears current exception #410

Closed
zware opened this issue Jun 13, 2015 · 6 comments
Closed

repr(CIMultiDictProxy(CIMultiDict())) clears current exception #410

zware opened this issue Jun 13, 2015 · 6 comments
Labels

Comments

@zware
Copy link

@zware zware commented Jun 13, 2015

Reproducer:

from aiohttp.multidict import CIMultiDictProxy, CIMultiDict
import sys

try:
    raise Exception
except Exception:
    print(sys.exc_info())
    repr(CIMultiDictProxy(CIMultiDict()))
    print(sys.exc_info())

Results:

(<class 'Exception'>, Exception(), <traceback object at 0x101a3d048>)
(None, None, None)

This is fairly serious; if you stick an 'as e' at the end of 'except Exception' and a 'raise' at the end of the except block, you wind up with a segfault.

Discovered in version 0.14.4, confirmed in 0.16.3.

@zware zware changed the title repr(CIMultiDictProxy() clears current exception repr(CIMultiDictProxy(CIMultiDict())) clears current exception Jun 13, 2015
@asvetlov
Copy link
Member

@asvetlov asvetlov commented Jun 13, 2015

Thanks for report!
It's Cython side effect.
Working on it.

Loading

@asvetlov
Copy link
Member

@asvetlov asvetlov commented Jun 13, 2015

Fixed in 0.16.4 release

Loading

@asvetlov asvetlov closed this Jun 13, 2015
@asvetlov
Copy link
Member

@asvetlov asvetlov commented Jun 13, 2015

Reported to Cython development list.

Loading

@zware
Copy link
Author

@zware zware commented Jun 15, 2015

Thanks for the quick response! I suspected it might be a Cython issue, but I'm completely unfamiliar with Cython.

Loading

@asvetlov
Copy link
Member

@asvetlov asvetlov commented Jun 15, 2015

@zware sure!

Loading

@lock
Copy link

@lock lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

Loading

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants