segmentation fault
When trying to form Singular polynomials with rational coefficients, I noticed that the following input causes a segmentation fault in Julia 0.6.2.
using Singular
R, vars = Singular.PolynomialRing( Singular.QQ, [ "x" ] )
x = vars[1]
divexact( x, 2 )
I've included Hans in CC in case he knows what we are doing wrong.
This problem also happens in Julia 0.6.1. I don't think it is Julia related.
It seems to fail only if dividing by a monomial, which is not a distinction we make in Singular.jl itself.
The Singular.jl code in question when doing divexact(x, x), for example, is line 327ff of poly/poly.jl [1].
This in turn calls libSingular/p_Divide, which is line 156ff of libsingular/rings.jl [2].
Bill.
[1] https://github.com/wbhart/Singular.jl/blob/master/src/poly/poly.jl [2] https://github.com/wbhart/Singular.jl/blob/master/src/libsingular/rings.jl
On 25 April 2018 at 12:35, ThomasBreuer [email protected] wrote:
When trying to form Singular polynomials with rational coefficients, I noticed that the following input causes a segmentation fault in Julia 0.6.2.
using Singular R, vars = Singular.PolynomialRing( Singular.QQ, [ "x" ] ) x = vars[1] divexact( x, 2 )
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wbhart/Singular.jl/issues/23, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOzppWPh-y8YoIbHREU8DQaZsNBskm2ks5tsFFlgaJpZM4TjLT6 .
There was reference to currRing(global variable) instead of the given ring r(parameter) in p_Divide. Should be fixed with https://github.com/Singular/Sources/commit/49c52207c191fea1e40f3e9a3f70893e206a7971