-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
A code example where Julia does not abort gracefully:
(::Type{T})(x::Int) where {T<:Integer} = println("crash")
entered in the REPL leads to:
crashcrashcrashcrashcrash
crashcrash
crash
corrupted double-linked list
signal (6): Aborted
while loading no file, in expression starting on line 0
A variation that leads to a sigsegv
(::Type{T})(x::Int) where {T<:Integer} = println(:crash)
prints
crashcrashcrashcrashcrash
crashcrash
crash
signal (11): Segmentation fault
while loading no file, in expression starting on line 0
unknown function (ip: 0x7ff958329554)
_ZN4llvm10AllocaInstC2EPNS_4TypeEPNS_5ValueEjRKNS_5TwineEPNS_11InstructionE at /home/picaud/ExternalSoftware/julia-d386e40c17/bin/../lib/julia/libLLVM-3.9.so (unknown line)
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:5643
....
My Julia version is:
Julia Version 0.6.2
Commit d386e40 (2017-12-13 18:08 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) CPU E5-2603 v3 @ 1.60GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
Obvioulsy this code is a non sense, the point is that Julia is really not happy with it.