Skip to content

gcd_sircana crash+assert #2218

@alexey-orlov-math

Description

@alexey-orlov-math

When writing tests for HessQR i have encountered

julia> F, mF = residue_ring(ZZ, 12); x = F[:x][2];

julia> Hecke.gcd_sircana(x^2+1,x+1)
ERROR: DomainError with -1:
Index must be non-negative
Stacktrace:
 [1] coeff(x::ZZModPolyRingElem, n::Int64)
   @ Nemo ~/.julia/packages/Nemo/xSaoQ/src/flint/fmpz_mod_poly.jl:49
 [2] fun_factor(f::ZZModPolyRingElem)
   @ Hecke ~/math/software/Hecke.jl/src/Misc/nmod_poly.jl:1050
 [3] gcd_sircana(f::zzModPolyRingElem, g::zzModPolyRingElem)
   @ Hecke ~/math/software/Hecke.jl/src/Misc/nmod_poly.jl:829
 [4] top-level scope
   @ REPL[20]:1

and

julia> F, mF = residue_ring(ZZ, 210); x = F[:x][2];

julia> Hecke.gcd_sircana(x^2+1,x+1)
ERROR: AssertionError: f * qf == _F
Stacktrace:
 [1] gcd_sircana(f::zzModPolyRingElem, g::zzModPolyRingElem)
   @ Hecke ~/math/software/Hecke.jl/src/Misc/nmod_poly.jl:852
 [2] top-level scope
   @ REPL[24]:1

tagging @thofma since he knows a thing or two about this algorithm ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions