-
Notifications
You must be signed in to change notification settings - Fork 20
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
Segmentation fault in 0.29 - due to bogus cidr pointer? #15
Comments
when converting the string before checking, no Segfault is triggered, e.g.:
|
This looks like the same underlying issue as #14, which has a fix in master and v0.30 in PyPI now. Can you give it a try and let me know if you still see a a problem ? |
I'm seeing this as well from time to time, and I think I've found the problem with the help of Valgrind.
The problem is, |
Re-generate SubnetTree.py and SubnetTree_wrap.cc using the command in the Makefile with swig 3.0.12 (rather than newer 4.0) to keep changes minimal. The added tests fail as follows with the current version installable from pip: $ btest -d -v pysubnettree/errors.test pysubnettree.errors ... > python3 %INPUT ... pysubnettree.errors failed % 'python3 <...>/.tmp/pysubnettree.errors/errors.test' failed unexpectedly (exit code 139) % cat .stderr Segmentation fault (core dumped) This requires a 0.36 release and upload to pypi to fix pip users. I'm optimistically marking the following issues as closed (once we do the release they should actually be fixed). Closes #33 Closes #32 Closes #15
I am sanitizing larger amounts of bgpdumps and check prefixes against bogon lists.
As a result I keep larger amounts of data (multiple GB) in various data structures, mainly sets().
I am using python 3.5.3 and SubnetTree 0.29 from pip.
It seems the segfault does not occur using python 2.7 - at least not with the amount of data I put in. Will report back here once I observe a segfault.
After initial load the SubnetTree is used readonly using the "in" operator.
For some bgpdumps I can reproduce a Segmentation fault when checking if a certain IP-adress is in the SubnetTree. It is alway the same position in the file, so I guess the amount of data stored on the heap or stack is relevant.
A Segfault does not happen if I do not store data in the python sets.
I was able to backtrace this using gdb up to SubnetTree_wrap.cc
The text was updated successfully, but these errors were encountered: