-
Notifications
You must be signed in to change notification settings - Fork 34
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
python.core from packet.pyx #27
Comments
Yeah, that code is relatively new and could probably use some 'fuzz' testing... |
got it. No problem I'll submit a patch after I let it soak for a couple of days. |
Sam, whenever you have a "cpdef" or "cdef" function that returns a non-python value, you need to explicitly tell Cython what return value means "exception" (or "except *" to mean always check). |
I assume you're talking about getbyte()... looks a little tricky, actually, since there are no 'invalid' characters in a dns packet. How about this, have it return an 'int', declare it as "except -1"? |
I saw a python.core today that came from packet.pyx. I couldn't get gdb to load the symbols properly but from the traceback it seems that it received an empty response and we proceeded to unpack it. The daemon has been running for a month or so now and that's the first time I see this issue.
https://github.com/ironport/shrapnel/blob/master/coro/dns/stub_resolver.py#L43
I added a check to make sure that the reply is not empty before we pass it to unpacker. I'll see if it happens again.
I can provide the python core if anyone is interested in it.
The text was updated successfully, but these errors were encountered: