Closed
Description
openedon Nov 9, 2020
(Feel free to change the title - I don't know what's going on 🙃)
MWE:
function maptruncated(xs)
[
Symbol() for x in xs[1:20]
]
end
xs = tuple(("💕" for _ in 1:2000)...)
maptruncated(xs)
output, full version here:
fons@woof:~/disorganised-mess$ julia bugthing.jl
Internal error: encountered unexpected error in runtime:
StackOverflowError()
jl_compute_field_offsets at /buildworker/worker/package_linux64/build/src/datatype.c:491
inst_datatype_inner at /buildworker/worker/package_linux64/build/src/jltypes.c:1367
jl_apply_tuple_type_v_ at /buildworker/worker/package_linux64/build/src/jltypes.c:1385 [inlined]
jl_apply_tuple_type_v at /buildworker/worker/package_linux64/build/src/jltypes.c:1395
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:655
argtypes_to_type at ./compiler/typeutils.jl:46 [inlined]
abstract_call_known at ./compiler/abstractinterpretation.jl:887
abstract_call at ./compiler/abstractinterpretation.jl:910
abstract_apply at ./compiler/abstractinterpretation.jl:619
abstract_call_known at ./compiler/abstractinterpretation.jl:688
abstract_call at ./compiler/abstractinterpretation.jl:910
abstract_call at ./compiler/abstractinterpretation.jl:895
abstract_eval at ./compiler/abstractinterpretation.jl:989
typeinf_local at ./compiler/abstractinterpretation.jl:1254
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1310
typeinf at ./compiler/typeinfer.jl:12
typeinf_edge at ./compiler/typeinfer.jl:484
abstract_call_method at ./compiler/abstractinterpretation.jl:419
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:111
abstract_call_known at ./compiler/abstractinterpretation.jl:888
abstract_call at ./compiler/abstractinterpretation.jl:910
abstract_apply at ./compiler/abstractinterpretation.jl:619
abstract_call_known at ./compiler/abstractinterpretation.jl:688
abstract_call at ./compiler/abstractinterpretation.jl:910
abstract_call at ./compiler/abstractinterpretation.jl:895
abstract_eval at ./compiler/abstractinterpretation.jl:989
typeinf_local at ./compiler/abstractinterpretation.jl:1254
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1310
typeinf at ./compiler/typeinfer.jl:12
typeinf_edge at ./compiler/typeinfer.jl:484
(this pattern repeats, let's skip to the end:)
abstract_call at ./compiler/abstractinterpretation.jl:910
abstract_call at ./compiler/abstractinterpretation.jl:895
abstract_eval at ./compiler/abstractinterpretation.jl:989
typeinf_local at ./compiler/abstractinterpretation.jl:1254
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1310
typeinf at ./compiler/typeinfer.jl:12
typeinf_ext at ./compiler/typeinfer.jl:570
typeinf_ext at ./compiler/typeinfer.jl:601
jfptr_typeinf_ext_22701.clone_1 at /home/fons/julia-1.5.0-rc1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined]
jl_type_infer at /buildworker/worker/package_linux64/build/src/gf.c:296
jl_generate_fptr at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:290
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1964
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1919 [inlined]
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2224 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:117
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:206
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:157 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:566
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:660
top-level scope at /home/fons/disorganised-mess/bugthing.jl:10
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:840
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:913
jl_load_rewrite at /buildworker/worker/package_linux64/build/src/toplevel.c:914
include at ./Base.jl:380
include at ./Base.jl:368
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
exec_options at ./client.jl:296
_start at ./client.jl:506
jfptr__start_34305.clone_1 at /home/fons/julia-1.5.0-rc1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
unknown function (ip: 0x401931)
unknown function (ip: 0x401533)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4015d4)
fons@woof:~/disorganised-mess$
I noticed that the list comprehension needs to be contained inside a function for the error to occur.
Tested in Julia master (at time of writing) and 1.5.2, on Ubuntu Linux (intel xeon) and Windows (intel i5).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment