diff --git a/Project.toml b/Project.toml index 7f7f45f3a4ca..28fe96735f1b 100644 --- a/Project.toml +++ b/Project.toml @@ -42,7 +42,7 @@ Preferences = "1" Random = "1.6" RandomExtensions = "0.4.3" Serialization = "1.6" -Singular = "0.21.0" +Singular = "0.21.1" TOPCOM_jll = "0.17.8" UUIDs = "1.6" cohomCalg_jll = "0.32.0" diff --git a/src/Rings/groebner.jl b/src/Rings/groebner.jl index 06a23e3fb980..a465157d0128 100644 --- a/src/Rings/groebner.jl +++ b/src/Rings/groebner.jl @@ -96,15 +96,15 @@ degrevlex([x, y]) """ function _compute_standard_basis(B::IdealGens, ordering::MonomialOrdering, complete_reduction::Bool = false) # incorrect one - singular_assure(B, ordering) - R = B.Sx - I = Singular.Ideal(R, gens(B.S)...) - i = Singular.std(I, complete_reduction = complete_reduction) - BA = IdealGens(B.Ox, i, complete_reduction) - # correct one (segfaults) - #gensSord = singular_generators(B, ordering) - #i = Singular.std(gensSord, complete_reduction = complete_reduction) + #singular_assure(B, ordering) + #R = B.Sx + #I = Singular.Ideal(R, gens(B.S)...) + #i = Singular.std(I, complete_reduction = complete_reduction) #BA = IdealGens(B.Ox, i, complete_reduction) + # correct one (segfaults) + gensSord = singular_generators(B, ordering) + i = Singular.std(gensSord, complete_reduction = complete_reduction) + BA = IdealGens(B.Ox, i, complete_reduction) BA.isGB = true BA.ord = ordering if isdefined(BA, :S) diff --git a/test/Rings/MPolyAnyMap/MPolyQuo.jl b/test/Rings/MPolyAnyMap/MPolyQuo.jl index a4df66713434..985643f6c4bb 100644 --- a/test/Rings/MPolyAnyMap/MPolyQuo.jl +++ b/test/Rings/MPolyAnyMap/MPolyQuo.jl @@ -1,3 +1,22 @@ +@testset "MPolyAnyMap/MPolyQuoRing no segfault" begin + Qix, (x, y) = QQ["x", "y"] + I = ideal(Qix, elem_type(Qix)[]) + Qix, = quo(Qix, I) + x = Qix(x) + y = Qix(y) + f = hom(Qix, Qix, [x^2, y^2]) +end + +@testset "MPolyAnyMap/MPolyQuoRing segfault" begin + Qi, i = quadratic_field(-1) + Qix, (x, y) = Qi["x", "y"] + I = ideal(Qix, elem_type(Qix)[]) + Qix, = quo(Qix, I) + x = Qix(x) + y = Qix(y) + f = hom(Qix, Qix, [x^2, y^2]) +end + @testset "MPolyAnyMap/MPolyQuoRing" begin Qsqrt2, = quadratic_field(-1) Zx, _ = ZZ["x"]