Skip to content

Instantly share code, notes, and snippets.

@inkydragon
Last active November 18, 2021 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inkydragon/70e8afacbe1c4387115a93ce6b477223 to your computer and use it in GitHub Desktop.
Save inkydragon/70e8afacbe1c4387115a93ce6b477223 to your computer and use it in GitHub Desktop.
Reading symbols from usr/bin/julia-debug...
(gdb) r
Starting program: /cygdrive/v/julia/usr/bin/julia-debug tmp/seg.jl
[New Thread 8292.0x9e8]
[New Thread 8292.0x56f8]
[New Thread 8292.0x6530]
[New Thread 8292.0x944]
[New Thread 8292.0x35d8]
[New Thread 8292.0x6af0]
[New Thread 8292.0x7474]
[New Thread 8292.0x7064]
[New Thread 8292.0x5a80]
[New Thread 8292.0x3ebc]
[New Thread 8292.0xed0]
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00000002ede9443c in llvm::Value::getType (this=0x0) at /cygdrive/v/julia/usr/include/llvm/IR/Value.h:246
246 Type *getType() const { return VTy; }
(gdb) bt
#0 0x00000002ede9443c in llvm::Value::getType (this=0x0) at /cygdrive/v/julia/usr/include/llvm/IR/Value.h:246
#1 0x00000002edd3ab1b in maybe_bitcast (ctx=..., V=0x0, to=0x1063e2ce0)
at /cygdrive/v/julia/src/cgutils.cpp:428
#2 0x00000002edd67bfa in operator() (__closure=0xbf9250) at /cygdrive/v/julia/src/codegen.cpp:2205
#3 0x00000002edd951ea in emit_nullcheck_guard<emit_box_compare(jl_codectx_t&, const jl_cgval_t&, const jl_cgval_t&, llvm::Value*, llvm::Value*)::<lambda()>&>(jl_codectx_t &, llvm::Value *, struct {...} &) (ctx=...,
nullcheck=0x0, func=...) at /cygdrive/v/julia/src/cgutils.cpp:1107
#4 0x00000002edd926ca in emit_nullcheck_guard2<emit_box_compare(jl_codectx_t&, const jl_cgval_t&, const jl_cgval_t&, llvm::Value*, llvm::Value*)::<lambda()> >(jl_codectx_t &, llvm::Value *, llvm::Value *, struct {...} &&) (
ctx=..., nullcheck1=0x0, nullcheck2=0x0, func=...) at /cygdrive/v/julia/src/cgutils.cpp:1116
#5 0x00000002edd67f16 in emit_box_compare (ctx=..., arg1=..., arg2=..., nullcheck1=0x0, nullcheck2=0x0)
at /cygdrive/v/julia/src/codegen.cpp:2204
#6 0x00000002edd69ede in emit_f_is (ctx=..., arg1=..., arg2=..., nullcheck1=0x0, nullcheck2=0x0)
at /cygdrive/v/julia/src/codegen.cpp:2454
#7 0x00000002edd6abdd in emit_builtin_call (ctx=..., ret=0xbf9d00,
f=0x2a72126d0 <jl_system_image_data+2246416>, argv=0xbf9ad0, nargs=2,
rt=0x2a7069db0 <jl_system_image_data+507376>, ex=0x101fb51b0) at /cygdrive/v/julia/src/codegen.cpp:2568
#8 0x00000002edd735b2 in emit_call (ctx=..., ex=0x101fb51b0, rt=0x2a7069db0 <jl_system_image_data+507376>)
at /cygdrive/v/julia/src/codegen.cpp:3570
#9 0x00000002edd78e8a in emit_expr (ctx=..., expr=0x101fb51b0, ssaval=16)
at /cygdrive/v/julia/src/codegen.cpp:4400
#10 0x00000002edd76d28 in emit_ssaval_assign (ctx=..., idx=16, r=0x101fb51b0)
at /cygdrive/v/julia/src/codegen.cpp:4042
#11 0x00000002edd784a1 in emit_stmtpos (ctx=..., expr=0x101fb51b0, ssaval_result=16)
at /cygdrive/v/julia/src/codegen.cpp:4284
#12 0x00000002edd8b423 in emit_function (lam=0x101ee8560, src=0x101e9c910,
jlrettype=0x2a716c760 <jl_system_image_data+1566624>, params=..., vaOverride=false)
at /cygdrive/v/julia/src/codegen.cpp:7122
#13 0x00000002edd8d930 in jl_emit_code (li=0x101ee8560, src=0x101e9c910,
jlrettype=0x2a716c760 <jl_system_image_data+1566624>, params=...) at /cygdrive/v/julia/src/codegen.cpp:7484
#14 0x00000002edd8dca4 in jl_emit_codeinst (codeinst=0x101e93df0, src=0x101e9c910, params=...)
at /cygdrive/v/julia/src/codegen.cpp:7529
#15 0x00000002edd9d6eb in _jl_compile_codeinst (codeinst=0x101e93df0, src=0x101e9c910, world=31774)
at /cygdrive/v/julia/src/jitlayers.cpp:110
#16 0x00000002edd9e922 in jl_generate_fptr_impl (mi=0x101ee8560, world=31774)
at /cygdrive/v/julia/src/jitlayers.cpp:338
#17 0x00000002b5fae2c7 in jl_compile_method_internal (mi=0x101ee8560, world=31774)
at /cygdrive/v/julia/src/gf.c:1988
#18 0x00000002b5faf1a7 in _jl_invoke (F=0x101d070a8, args=0xbfcd98, nargs=2, mfunc=0x101ee8560, world=31774)
at /cygdrive/v/julia/src/gf.c:2261
#19 0x00000002b5fafaed in ijl_apply_generic (F=0x101d070a8, args=0xbfcd98, nargs=2)
at /cygdrive/v/julia/src/gf.c:2451
#20 0x00000002b5fcbd4d in jl_apply (args=0xbfcd90, nargs=3) at /cygdrive/v/julia/src/julia.h:1773
#21 0x00000002b5fcc1a3 in do_call (args=0x101ee8498, nargs=3, s=0xbfd260)
at /cygdrive/v/julia/src/interpreter.c:126
#22 0x00000002b5fcc97f in eval_value (e=0x101ee1d10, s=0xbfd260) at /cygdrive/v/julia/src/interpreter.c:215
#23 0x00000002b5fcc4c3 in eval_stmt_value (stmt=0x101ee1d10, s=0xbfd260)
at /cygdrive/v/julia/src/interpreter.c:166
#24 0x00000002b5fce636 in eval_body (stmts=0x101ede750, s=0xbfd260, ip=0, toplevel=1)
at /cygdrive/v/julia/src/interpreter.c:589
#25 0x00000002b5fcf31b in jl_interpret_toplevel_thunk (m=0x2a7056c00 <jl_system_image_data+429120>,
src=0x101e9c890) at /cygdrive/v/julia/src/interpreter.c:739
#26 0x00000002b5ff5829 in jl_toplevel_eval_flex (m=0x2a7056c00 <jl_system_image_data+429120>, e=0x101ec7b90,
fast=1, expanded=0) at /cygdrive/v/julia/src/toplevel.c:888
#27 0x00000002b5ff53a7 in jl_toplevel_eval_flex (m=0x2a7056c00 <jl_system_image_data+429120>, e=0x101ec7c50,
fast=1, expanded=0) at /cygdrive/v/julia/src/toplevel.c:832
#28 0x00000002b5ff5885 in ijl_toplevel_eval (m=0x2a7056c00 <jl_system_image_data+429120>, v=0x101ec7c50) at /cygdrive/v/julia/src/toplevel.c:897
#29 0x00000002b5ff5ae6 in ijl_toplevel_eval_in (m=0x2a7056c00 <jl_system_image_data+429120>, ex=0x101ec7c50) at /cygdrive/v/julia/src/toplevel.c:947
#30 0x00000002a686232c in eval () at boot.jl:368
#31 japi1_include_string_21362 (mapexpr=..., mod=0x101bb3350, code=0x214, filename=0x13) at loading.jl:1245
#32 0x00000002b5fae5bb in jl_fptr_args (f=0x2a7cb60a0 <jl_system_image_data+13402336>, args=0xbfdd40, nargs=4, m=0x2a7cb6500 <jl_system_image_data+13403456>) at /cygdrive/v/julia/src/gf.c:2032
#33 0x00000002b5faf11f in _jl_invoke (F=0x2a7cb60a0 <jl_system_image_data+13402336>, args=0xbfdd40, nargs=4, mfunc=0x2a7cb54a0 <jl_system_image_data+13399264>, world=31771) at /cygdrive/v/julia/src/gf.c:2250
#34 0x00000002b5fafaed in ijl_apply_generic (F=0x2a7cb60a0 <jl_system_image_data+13402336>, args=0xbfdd40, nargs=4) at /cygdrive/v/julia/src/gf.c:2451
#35 0x00000002a6b44a60 in japi1__include_47025 (mapexpr=0x2a7e952d0 <jl_system_image_data+15364880>, mod=0x101bb3350, _path=0xa) at loading.jl:1302
#36 0x00000002a6b44591 in julia_include_43020 (mod=0x101bb3350, _path=0xa) at Base.jl:414
#37 0x00000002a6b445d6 in jfptr_include_43021 () from /cygdrive/v/julia/usr/lib/julia/sys-debug.dll
#38 0x00000002b5faf11f in _jl_invoke (F=0x2a79c1720 <jl_system_image_data+10303328>, args=0xbff5b0, nargs=2, mfunc=0x2a79c00d0 <jl_system_image_data+10297616>, world=31771) at /cygdrive/v/julia/src/gf.c:2250
#39 0x00000002b5fafaed in ijl_apply_generic (F=0x2a79c1720 <jl_system_image_data+10303328>, args=0xbff5b0, nargs=2) at /cygdrive/v/julia/src/gf.c:2451
#40 0x00000002a66a8bff in julia_exec_options_45361 (opts=...) at client.jl:295
#41 0x00000002a66a97ee in julia__start_28008 () at client.jl:497
#42 0x00000002a66a997f in jfptr.start_28009 () from /cygdrive/v/julia/usr/lib/julia/sys-debug.dll
#43 0x00000002b5faf11f in _jl_invoke (F=0x2a79cf3b0 <jl_system_image_data+10359792>, args=0xbffb40, nargs=0, mfunc=0x2a79cef40 <jl_system_image_data+10358656>, world=31771) at /cygdrive/v/julia/src/gf.c:2250
#44 0x00000002b5fafaed in ijl_apply_generic (F=0x2a79cf3b0 <jl_system_image_data+10359792>, args=0xbffb40, nargs=0) at /cygdrive/v/julia/src/gf.c:2451
#45 0x00000002b6023b48 in jl_apply (args=0xbffb38, nargs=1) at /cygdrive/v/julia/src/julia.h:1773
#46 0x00000002b6025420 in true_main (argc=1, argv=0xd0118) at /cygdrive/v/julia/src/jlapi.c:562
#47 0x00000002b6025a18 in jl_repl_entrypoint (argc=1, argv=0xd0110) at /cygdrive/v/julia/src/jlapi.c:706
#48 0x0000000260da219d in jl_load_repl (argc=2, argv=0xd0110) at /cygdrive/v/julia/cli/loader_lib.c:272
#49 0x000000014000195b in mainCRTStartup () at /cygdrive/v/julia/cli/loader_exe.c:59
$ ./julia.bat
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.8.0-DEV.1013 (2021-11-18)
_/ |\__'_|_|_|\__'_| | Commit 455236eb7f (0 days old master)
|__/ |
julia> versioninfo()
Julia Version 1.8.0-DEV.1013
Commit 455236eb7f (2021-11-18 02:18 UTC)
DEBUG build
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x2ede9443c -- getType at /cygdrive/v/julia/usr/include/llvm/IR\Value.h:246
in expression starting at REPL[8]:1
getType at /cygdrive/v/julia/usr/include/llvm/IR\Value.h:246
maybe_bitcast at /cygdrive/v/julia/src\cgutils.cpp:428
operator() at /cygdrive/v/julia/src\codegen.cpp:2205
emit_nullcheck_guard<emit_box_compare(jl_codectx_t&, const jl_cgval_t&, const jl_cgval_t&, llvm::Value*, llvm::Value*)::<lambda()>&> at /cygdrive/v/julia/src\cgutils.cpp:1107
emit_nullcheck_guard2<emit_box_compare(jl_codectx_t&, const jl_cgval_t&, const jl_cgval_t&, llvm::Value*, llvm::Value*)::<lambda()> > at /cygdrive/v/julia/src\cgutils.cpp:1116
emit_box_compare at /cygdrive/v/julia/src\codegen.cpp:2204
emit_f_is at /cygdrive/v/julia/src\codegen.cpp:2454
emit_builtin_call at /cygdrive/v/julia/src\codegen.cpp:2568
emit_call at /cygdrive/v/julia/src\codegen.cpp:3570
emit_expr at /cygdrive/v/julia/src\codegen.cpp:4400
emit_ssaval_assign at /cygdrive/v/julia/src\codegen.cpp:4042
emit_stmtpos at /cygdrive/v/julia/src\codegen.cpp:4284
emit_function at /cygdrive/v/julia/src\codegen.cpp:7122
jl_emit_code at /cygdrive/v/julia/src\codegen.cpp:7484
jl_emit_codeinst at /cygdrive/v/julia/src\codegen.cpp:7529
_jl_compile_codeinst at /cygdrive/v/julia/src\jitlayers.cpp:110
jl_generate_fptr_impl at /cygdrive/v/julia/src\jitlayers.cpp:338
jl_compile_method_internal at /cygdrive/v/julia/src\gf.c:1988
_jl_invoke at /cygdrive/v/julia/src\gf.c:2261
ijl_apply_generic at /cygdrive/v/julia/src\gf.c:2451
jl_apply at /cygdrive/v/julia/src\julia.h:1773
do_call at /cygdrive/v/julia/src\interpreter.c:126
eval_value at /cygdrive/v/julia/src\interpreter.c:215
eval_stmt_value at /cygdrive/v/julia/src\interpreter.c:166
eval_body at /cygdrive/v/julia/src\interpreter.c:589
jl_interpret_toplevel_thunk at /cygdrive/v/julia/src\interpreter.c:739
jl_toplevel_eval_flex at /cygdrive/v/julia/src\toplevel.c:888
jl_toplevel_eval_flex at /cygdrive/v/julia/src\toplevel.c:832
ijl_toplevel_eval at /cygdrive/v/julia/src\toplevel.c:897
ijl_toplevel_eval_in at /cygdrive/v/julia/src\toplevel.c:947
eval at .\boot.jl:368 [inlined]
eval_user_input at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:151
repl_backend_loop at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:245
start_repl_backend at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:230
#run_repl#47 at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:363
run_repl at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:350
jfptr_run_repl_52746 at V:\julia\usr\lib\julia\sys-debug.dll (unknown line)
_jl_invoke at /cygdrive/v/julia/src\gf.c:2250
ijl_apply_generic at /cygdrive/v/julia/src\gf.c:2451
#933 at .\client.jl:394
jfptr_YY.933_32904 at V:\julia\usr\lib\julia\sys-debug.dll (unknown line)
_jl_invoke at /cygdrive/v/julia/src\gf.c:2250
ijl_apply_generic at /cygdrive/v/julia/src\gf.c:2451
jl_apply at /cygdrive/v/julia/src\julia.h:1773
jl_f__call_latest at /cygdrive/v/julia/src\builtins.c:757
#invokelatest#2 at .\essentials.jl:731 [inlined]
invokelatest at .\essentials.jl:729 [inlined]
run_main_repl at .\client.jl:379
exec_options at .\client.jl:309
_start at .\client.jl:497
jfptr__start_28009 at V:\julia\usr\lib\julia\sys-debug.dll (unknown line)
_jl_invoke at /cygdrive/v/julia/src\gf.c:2250
ijl_apply_generic at /cygdrive/v/julia/src\gf.c:2451
jl_apply at /cygdrive/v/julia/src\julia.h:1773
true_main at /cygdrive/v/julia/src\jlapi.c:562
jl_repl_entrypoint at /cygdrive/v/julia/src\jlapi.c:706
jl_load_repl at /cygdrive/v/julia/cli\loader_lib.c:272
mainCRTStartup at /cygdrive/v/julia/cli\loader_exe.c:59
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 2400820 (Pool: 2399721; Big: 1099); GC: 3
$ ./julia.bat
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.8.0-DEV.1013 (2021-11-18)
_/ |\__'_|_|_|\__'_| | Commit 455236eb7f (0 days old master)
|__/ |
julia> versioninfo()
Julia Version 1.8.0-DEV.1013
Commit 455236eb7f (2021-11-18 02:18 UTC)
DEBUG build
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
julia> fn1 = t->0.0;
julia> fn2 = t->0.0;
julia> generator = (
fn1,
fn2
);
julia>
julia> function broken2(gen, control)
for f in gen
if f === control
nothing
end
end
end
broken2 (generic function with 1 method)
julia>
julia> [ f===fn1 for f in generator] # works
2-element Vector{Bool}:
1
0
julia> filter(x -> x===fn1, generator) # works
(var"#1#2"(),)
julia>
julia> broken2(generator, fn1) # throw
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x2ede9443c -- getType at /cygdrive/v/julia/usr/include/llvm/IR\Value.h:246
in expression starting at REPL[8]:1
getType at /cygdrive/v/julia/usr/include/llvm/IR\Value.h:246
maybe_bitcast at /cygdrive/v/julia/src\cgutils.cpp:428
operator() at /cygdrive/v/julia/src\codegen.cpp:2205
emit_nullcheck_guard<emit_box_compare(jl_codectx_t&, const jl_cgval_t&, const jl_cgval_t&, llvm::Value*, llvm::Value*)::<lambda()>&> at /cygdrive/v/julia/src\cgutils.cpp:1107
emit_nullcheck_guard2<emit_box_compare(jl_codectx_t&, const jl_cgval_t&, const jl_cgval_t&, llvm::Value*, llvm::Value*)::<lambda()> > at /cygdrive/v/julia/src\cgutils.cpp:1116
emit_box_compare at /cygdrive/v/julia/src\codegen.cpp:2204
emit_f_is at /cygdrive/v/julia/src\codegen.cpp:2454
emit_builtin_call at /cygdrive/v/julia/src\codegen.cpp:2568
emit_call at /cygdrive/v/julia/src\codegen.cpp:3570
emit_expr at /cygdrive/v/julia/src\codegen.cpp:4400
emit_ssaval_assign at /cygdrive/v/julia/src\codegen.cpp:4042
emit_stmtpos at /cygdrive/v/julia/src\codegen.cpp:4284
emit_function at /cygdrive/v/julia/src\codegen.cpp:7122
jl_emit_code at /cygdrive/v/julia/src\codegen.cpp:7484
jl_emit_codeinst at /cygdrive/v/julia/src\codegen.cpp:7529
_jl_compile_codeinst at /cygdrive/v/julia/src\jitlayers.cpp:110
jl_generate_fptr_impl at /cygdrive/v/julia/src\jitlayers.cpp:338
jl_compile_method_internal at /cygdrive/v/julia/src\gf.c:1988
_jl_invoke at /cygdrive/v/julia/src\gf.c:2261
ijl_apply_generic at /cygdrive/v/julia/src\gf.c:2451
jl_apply at /cygdrive/v/julia/src\julia.h:1773
do_call at /cygdrive/v/julia/src\interpreter.c:126
eval_value at /cygdrive/v/julia/src\interpreter.c:215
eval_stmt_value at /cygdrive/v/julia/src\interpreter.c:166
eval_body at /cygdrive/v/julia/src\interpreter.c:589
jl_interpret_toplevel_thunk at /cygdrive/v/julia/src\interpreter.c:739
jl_toplevel_eval_flex at /cygdrive/v/julia/src\toplevel.c:888
jl_toplevel_eval_flex at /cygdrive/v/julia/src\toplevel.c:832
ijl_toplevel_eval at /cygdrive/v/julia/src\toplevel.c:897
ijl_toplevel_eval_in at /cygdrive/v/julia/src\toplevel.c:947
eval at .\boot.jl:368 [inlined]
eval_user_input at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:151
repl_backend_loop at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:245
start_repl_backend at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:230
#run_repl#47 at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:363
run_repl at V:\julia\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:350
jfptr_run_repl_52746 at V:\julia\usr\lib\julia\sys-debug.dll (unknown line)
_jl_invoke at /cygdrive/v/julia/src\gf.c:2250
ijl_apply_generic at /cygdrive/v/julia/src\gf.c:2451
#933 at .\client.jl:394
jfptr_YY.933_32904 at V:\julia\usr\lib\julia\sys-debug.dll (unknown line)
_jl_invoke at /cygdrive/v/julia/src\gf.c:2250
ijl_apply_generic at /cygdrive/v/julia/src\gf.c:2451
jl_apply at /cygdrive/v/julia/src\julia.h:1773
jl_f__call_latest at /cygdrive/v/julia/src\builtins.c:757
#invokelatest#2 at .\essentials.jl:731 [inlined]
invokelatest at .\essentials.jl:729 [inlined]
run_main_repl at .\client.jl:379
exec_options at .\client.jl:309
_start at .\client.jl:497
jfptr__start_28009 at V:\julia\usr\lib\julia\sys-debug.dll (unknown line)
_jl_invoke at /cygdrive/v/julia/src\gf.c:2250
ijl_apply_generic at /cygdrive/v/julia/src\gf.c:2451
jl_apply at /cygdrive/v/julia/src\julia.h:1773
true_main at /cygdrive/v/julia/src\jlapi.c:562
jl_repl_entrypoint at /cygdrive/v/julia/src\jlapi.c:706
jl_load_repl at /cygdrive/v/julia/cli\loader_lib.c:272
mainCRTStartup at /cygdrive/v/julia/cli\loader_exe.c:59
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 2402594 (Pool: 2401500; Big: 1094); GC: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment