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

segfault #23

Closed
videlec opened this issue Apr 17, 2019 · 4 comments
Closed

segfault #23

videlec opened this issue Apr 17, 2019 · 4 comments

Comments

@videlec
Copy link
Contributor

videlec commented Apr 17, 2019

The following consistently produces a segfault

>>> from PyNormaliz import Cone, NmzCone, NmzResult
>>> V = [[-1, -1, 1], [-1, 0, 1], [-1, 1, 1], [0, -1, 1], [0, 0, 1], [0, 1, 1], [1, -1, 1], [1, 0, 1], [1, 1, 1]]
>>> cube1 = Cone(vertices=V)
>>> cube2 = NmzCone(vertices=V)
>>> NmzResult(cube2, "SupportHyperplanes") == [[-1, 0, 1], [0, -1, 1], [0, 1, 1], [1, 0, 1]]
True
>>> NmzResult(cube2, "Volume") == [[8, 1]]
True
>>> cube1.Triangulation()
@jplab
Copy link
Contributor

jplab commented Apr 22, 2019

Inside sage, I get:

sage: V = [[-1, -1, 1], [-1, 0, 1], [-1, 1, 1], [0, -1, 1], [0, 0, 1], [0, 1, 1], [1, -1, 1], [1, 0, 1], [1, 1, 1]]
sage: cube1 = Cone(vertices=V)
sage: cube1.Triangulation()
[[[0L, 1L, 3L], 1L],
 [[1L, 2L, 3L], 1L],
 [[2L, 3L, 4L], 1L],
 [[2L, 4L, 5L], 1L],
 [[3L, 4L, 6L], 1L],
 [[4L, 5L, 6L], 1L],
 [[5L, 6L, 7L], 1L],
 [[5L, 7L, 8L], 1L]]

@videlec
Copy link
Contributor Author

videlec commented Apr 22, 2019

@jplab What do you mean inside Sage? which Normaliz version? which PyNormaliz version?

@jplab
Copy link
Contributor

jplab commented Apr 22, 2019

I have the latest version of the branch of the ticket 27682, with the latest commit of pynormaliz on github, and normaliz 3.7.0.

I just executed the earliest code in "sage -python" and got exactly the segfault after cube1.Triangulation().

Executing in sage:

sage: V = [[-1, -1, 1], [-1, 0, 1], [-1, 1, 1], [0, -1, 1], [0, 0, 1], [0, 1, 1], [1, -1, 1], [1, 0, 1], [1, 1, 1]]
sage: cube2 = NmzCone(vertices=V)
sage: NmzResult(cube2, "SupportHyperplanes") == [[-1, 0, 1], [0, -1, 1], [0, 1, 1], [1, 0, 1]]
True
sage: NmzResult(cube2, "Volume") == [[8, 1]]
True
sage: ------------------------------------------------------------------------
/home/jplabbe/sage/local/lib/python2.7/site-packages/cysignals/signals.so(+0x79e5)[0x7fbb9a4c19e5]
[snip]
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
/usr/local/bin/sage: line 3: 26664 Segmentation fault      ~/sage/./sage $@

@videlec
Copy link
Contributor Author

videlec commented Apr 23, 2019

Fixed by 997ae34

@videlec videlec closed this as completed Apr 23, 2019
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

2 participants