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

Segmentation fault when calling Tate's algorithm #1716

Open
simonbrandhorst opened this issue Jan 3, 2025 · 3 comments
Open

Segmentation fault when calling Tate's algorithm #1716

simonbrandhorst opened this issue Jan 3, 2025 · 3 comments

Comments

@simonbrandhorst
Copy link
Collaborator

julia> using Hecke
 _    _           _        
| |  | |         | |         |  Software package for
| |__| | ___  ___| | _____   |  algorithmic algebraic number theory
|  __  |/ _ \/ __| |/ / _ \  |  
| |  | |  __/ (__|   <  __/  |  Manual: https://thofma.github.io/Hecke.jl
|_|  |_|\___|\___|_|\_\___|  |  Version 0.34.8-dev

julia> K,s = rational_function_field(GF(2),:s)
(Rational function field over GF(2), s)

julia> E = elliptic_curve(K,[0,1,s,1,1])
Elliptic curve with equation
y^2 + s*y = x^3 + x^2 + x + 1

julia> tates_algorithm_local(E,K(0))

[6337] signal (11.1): Segmentation fault
in expression starting at REPL[4]:1
fmpz_invmod at /workspace/srcdir/flint/src/fmpz/invmod.c:36
fq_ctx_init_modulus at /workspace/srcdir/flint/src/fq/ctx_init_modulus.c:38
gr_ctx_init_fq_modulus_fmpz_mod_poly at /workspace/srcdir/flint/src/gr/fq.c:771
gr_ctx_init_fq_modulus_nmod_poly at /workspace/srcdir/flint/src/gr/fq.c:786
fq_default_ctx_init_modulus_nmod_type at /workspace/srcdir/flint/src/fq_default/ctx.c:160
_fq_field_from_nmod_poly_in_disguise at /home/simonbrandhorst/.julia/packages/Nemo/Mhf6i/src/flint/fq_default_extended.jl:579
#527 at /home/simonbrandhorst/.julia/packages/Nemo/Mhf6i/src/flint/fq_default_extended.jl:609
get_cached! at /home/simonbrandhorst/.julia/packages/AbstractAlgebra/AqzuZ/src/AbstractAlgebra.jl:159 [inlined]
FqField at /home/simonbrandhorst/.julia/packages/Nemo/Mhf6i/src/flint/fq_default_extended.jl:602 [inlined]
#_residue_field#543 at /home/simonbrandhorst/.julia/packages/Nemo/Mhf6i/src/flint/fq_default_extended.jl:736 [inlined]
_residue_field at /home/simonbrandhorst/.julia/packages/Nemo/Mhf6i/src/flint/fq_default_extended.jl:732 [inlined]
_residue_field at /home/simonbrandhorst/.julia/packages/Nemo/Mhf6i/src/flint/fq_default_extended.jl:732 [inlined]
residue_field at /home/simonbrandhorst/.julia/dev/Hecke/src/GenOrd/Ideal.jl:584 [inlined]
_tates_algorithm at /home/simonbrandhorst/.julia/dev/Hecke/src/EllCrv/LocalData.jl:63
_tates_algorithm at /home/simonbrandhorst/.julia/dev/Hecke/src/EllCrv/LocalData.jl:79
tates_algorithm_local at /home/simonbrandhorst/.julia/dev/Hecke/src/EllCrv/LocalData.jl:24
unknown function (ip: 0x7fbd64f7c68b)
_jl_invoke at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:2894 [inlined]
ijl_apply_generic at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:3076
jl_apply at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/julia.h:1982 [inlined]
do_call at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/interpreter.c:126
eval_value at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/interpreter.c:223
eval_stmt_value at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/interpreter.c:174 [inlined]
eval_body at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/interpreter.c:617
jl_interpret_toplevel_thunk at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/interpreter.c:775
jl_toplevel_eval_flex at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/toplevel.c:934
jl_toplevel_eval_flex at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/toplevel.c:877
ijl_toplevel_eval_in at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/toplevel.c:985
eval at ./boot.jl:385 [inlined]
eval_user_input at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:150
repl_backend_loop at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:246
#start_repl_backend#46 at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:231
start_repl_backend at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:228
_jl_invoke at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:2894 [inlined]
ijl_apply_generic at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:3076
#run_repl#59 at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:389
run_repl at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:375
jfptr_run_repl_91745.1 at /home/simonbrandhorst/julia-1.10.2/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:2894 [inlined]
ijl_apply_generic at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:3076
#1013 at ./client.jl:432
jfptr_YY.1013_82712.1 at /home/simonbrandhorst/julia-1.10.2/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:2894 [inlined]
ijl_apply_generic at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:3076
jl_apply at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/julia.h:1982 [inlined]
jl_f__call_latest at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/builtins.c:812
#invokelatest#2 at ./essentials.jl:892 [inlined]
invokelatest at ./essentials.jl:889 [inlined]
run_main_repl at ./client.jl:416
exec_options at ./client.jl:333
_start at ./client.jl:552
jfptr__start_82738.1 at /home/simonbrandhorst/julia-1.10.2/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:2894 [inlined]
ijl_apply_generic at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:3076
jl_apply at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/julia.h:1982 [inlined]
true_main at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/jlapi.c:582
jl_repl_entrypoint at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/jlapi.c:731
main at julia (unknown line)
__libc_start_call_main at /lib64/libc.so.6 (unknown line)
__libc_start_main at /lib64/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)
Allocations: 4612450 (Pool: 4609141; Big: 3309); GC: 6
Segmentation fault (core dumped)
@simonbrandhorst
Copy link
Collaborator Author

Okay the input is nonsense, but it should not give a segfault.

@thofma
Copy link
Owner

thofma commented Jan 8, 2025

Agreed, it should not segfault

@thofma
Copy link
Owner

thofma commented Jan 8, 2025

julia> is_irreducible(numerator(K(0)))
true

:(

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