Skip to content

Segfault when packing and ext handler is a dict #2

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

Open
bbjubjub2494 opened this issue May 7, 2017 · 1 comment
Open

Segfault when packing and ext handler is a dict #2

bbjubjub2494 opened this issue May 7, 2017 · 1 comment

Comments

@bbjubjub2494
Copy link

bbjubjub2494 commented May 7, 2017

When a packer instance has a dict as its ext handler and it is passed None, it segfaults after printing Exception TypeError: "'NoneType' object has no attribute '__getitem__'" in 'mpack.unparse_enter' ignored.
The problem doesn't appear when the handler is something else, nor with anything but None, nor when unpacking an ext.

Travis proof: https://travis-ci.org/lourkeur/libmpack-python/builds/229769196https://travis-ci.org/lourkeur/libmpack-python/builds/229764123

@bbjubjub2494 bbjubjub2494 changed the title Segfault when None is packed and ext handler is a dict Segfault when packing and ext handler is a dict May 7, 2017
@bbjubjub2494
Copy link
Author

bbjubjub2494 commented May 7, 2017

Correction: it doesn't need to be None, it can't be anything that's not handled by the normal mechanism and thus goes to the handler. The fact that it goes off on None is due to #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

1 participant