-
Notifications
You must be signed in to change notification settings - Fork 9
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
canonicalize segfaulting #35
Comments
Thanks for reporting. It looks like you might be triggering a bug in cddlib since it only segfaults on particular inputs. Do you get segfaults as well if you use cddlib directly (rather than via Python)? |
Sorry for not better recognising what was going on -- in both of the
The principle of least astonishment would say that canonicalising vacuous system of inequalities would deliver the input unchanged, and indeed this is what cdd seems to be doing. If I run
I get:
|
Thanks for minimizing the test case and for confirming that the problem is indeed on pycddlib's end. I'll see if I can figure out what's causing this... |
Can I ask you if you get a segfault in C if you also properly free the sets allocated by dd_MatrixCanonicalize, i.e. with
|
No, freeing everything with
does not segfault for me. I'm on a recent mac, FWIW, using |
Ok, thanks for testing. I'll try to put this through valgrind and gdb to see where the problem is. |
It's been a long time but I do have an update: oddly, the canonicalization functions for implicit linearities and redundant inequalities (which are now wrapped as well in the develop branch), when run by themselves, don't crash when the space is R^n. So, I've been looking hard through the code due and cannot rule out that cddlib itself is doing something that causes a random crash, likely an non-initialized pointer somewhere which only triggers on some systems/compilers/situations/... I've addressed one obvious culprit (there's a PR for it on cddlib upstream) but there are likely others. The biggest problem I have now is that I cannot reproduce this anymore on my current linux system. It still pops up on continuous integration testing... but only if I build pycddlib against the system cddlib libraries, which I cannot patch... Very frustrating! |
In the below,
good
functions run cleanly andprob
functionssignal 11: SIGSEGV
. The same happens with for rational arithmetic. Python 3.7.4 on OSX, pip installed with GMP.pycddlib 2.1.0
.The text was updated successfully, but these errors were encountered: