Skip to content

Sparse arrays segmentation fault when calling setindex(::Int, ::Vector) = ::Adjoint #43644

Closed

Description

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.1 (2021-12-22)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using SparseArrays

julia> K = spzeros(5,5)
5×5 SparseMatrixCSC{Float64, Int64} with 0 stored entries:
  ⋅    ⋅    ⋅    ⋅    ⋅ 
  ⋅    ⋅    ⋅    ⋅    ⋅ 
  ⋅    ⋅    ⋅    ⋅    ⋅ 
  ⋅    ⋅    ⋅    ⋅    ⋅ 
  ⋅    ⋅    ⋅    ⋅    ⋅ 

julia> K[3,1:4] += [1.0 2.0 3.0 4.0]'

signal (11): Segmentation fault
in expression starting at none:0
jl_object_id__cold at /buildworker/worker/package_linux64/build/src/builtins.c:400
type_hash at /buildworker/worker/package_linux64/build/src/jltypes.c:1125
typekey_hash at /buildworker/worker/package_linux64/build/src/jltypes.c:1137 [inlined]
lookup_type at /buildworker/worker/package_linux64/build/src/jltypes.c:705
inst_datatype_inner at /buildworker/worker/package_linux64/build/src/jltypes.c:1394
inst_datatype_env at /buildworker/worker/package_linux64/build/src/jltypes.c:906 [inlined]
inst_datatype_env at /buildworker/worker/package_linux64/build/src/jltypes.c:910 [inlined]
inst_datatype_env at /buildworker/worker/package_linux64/build/src/jltypes.c:910
jl_apply_type at /buildworker/worker/package_linux64/build/src/jltypes.c:926
jl_apply_type2 at /buildworker/worker/package_linux64/build/src/jltypes.c:981
decode_backtrace at /buildworker/worker/package_linux64/build/src/stackwalk.c:293
jl_get_excstack at /buildworker/worker/package_linux64/build/src/stackwalk.c:354
#current_exceptions#67 at ./error.jl:149
current_exceptions at ./error.jl:149 [inlined]
current_exceptions at ./error.jl:149 [inlined]
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:162
repl_backend_loop at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:244
start_repl_backend at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:229
#run_repl#47 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:362
run_repl at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:349
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
#930 at ./client.jl:394
jfptr_YY.930_40362.clone_1 at /home/elias/juliaversions/julia-1.7.1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
jl_f__call_latest at /buildworker/worker/package_linux64/build/src/builtins.c:757
#invokelatest#2 at ./essentials.jl:716 [inlined]
invokelatest at ./essentials.jl:714 [inlined]
run_main_repl at ./client.jl:379
exec_options at ./client.jl:309
_start at ./client.jl:495
jfptr__start_40531.clone_1 at /home/elias/juliaversions/julia-1.7.1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
true_main at /buildworker/worker/package_linux64/build/src/jlapi.c:559
jl_repl_entrypoint at /buildworker/worker/package_linux64/build/src/jlapi.c:701
main at julia17 (unknown line)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x400808)
Allocations: 2380884 (Pool: 2379944; Big: 940); GC: 3
Segmentation fault (core dumped)

julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorsparseSparse arrays

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions