Skip to content

collect-related segfault #31406

Closed
Closed
@xitology

Description

@xitology

I'm getting segfault with the following code:

julia> versioninfo()
Julia Version 1.2.0-DEV.491
Commit 8c0b550b61 (2019-03-17 17:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

julia> abstract type Shape end

julia> struct ValueOf <: Shape; ty::Type; end

julia> struct TupleOf <: Shape; cols::Vector{Shape}; end

julia> TupleOf(cols::Union{Shape,Type}...) = TupleOf(collect(Shape, cols))
TupleOf

julia> TupleOf(ValueOf(Int), Float64)
Unreachable reached at 0x7f89b108fb6a

signal (4): Illegal instruction
in expression starting at REPL[6]:1
setindex! at ./array.jl:766
copyto! at ./abstractarray.jl:680 [inlined]
_collect at ./array.jl:505 [inlined]
collect at ./array.jl:503 [inlined]
Type at ./REPL[5]:1
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1895
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2250
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:772
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:884
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f89c137900f)
unknown function (ip: (nil))
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:893
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:797
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:746
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:826
eval at ./boot.jl:327
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2250
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:86
macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:118 [inlined]
#26 at ./task.jl:261
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2250
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1594 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:572
unknown function (ip: 0xffffffffffffffff)
Allocations: 6029628 (Pool: 6028094; Big: 1534); GC: 12
Illegal instruction (core dumped)

It seems to work fine with --inline=no.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions