Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created September 28, 2024 19:39
Show Gist options
  • Save dogbert17/23618069d8e506e1ca7255cdd011d570 to your computer and use it in GitHub Desktop.
Save dogbert17/23618069d8e506e1ca7255cdd011d570 to your computer and use it in GitHub Desktop.
Bytecode
Starting program: /home/dilbert/repos/rakudo/install/bin/moar --execname=/home/dilbert/repos/rakudo/rakudo-gdb-m --libpath=/home/dilbert/repos/rakudo --libpath=/home/dilbert/repos/rakudo/blib --libpath=/home/dilbert/repos/rakudo/install/share/nqp/lib /home/dilbert/repos/rakudo/perl6.moarvm -e await\ \(\^5\).map\(\{start\ \{\ print\ qqx\{echo\ \$_\}\ \}\ \}\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff71d0640 (LWP 44155)]
[New Thread 0x7ffff3693640 (LWP 44164)]
[New Thread 0x7ffff2e90640 (LWP 44165)]
[New Thread 0x7ffff268d640 (LWP 44166)]
[New Thread 0x7ffff1e8a640 (LWP 44167)]
[New Thread 0x7ffff1687640 (LWP 44168)]
[New Thread 0x7ffff0e84640 (LWP 44169)]
[New Thread 0x7fffebfff640 (LWP 44170)]
[Switching to Thread 0x7ffff1687640 (LWP 44168)]
Thread 7 "moar" hit Breakpoint 1, MVM_panic (exitCode=1, messageFormat=0x7ffff79a8e70 "Collectable %p in fromspace accessed") at src/core/exceptions.c:855
855 fputs("MoarVM panic: ", stderr);
(gdb) bt
#0 MVM_panic (exitCode=1, messageFormat=0x7ffff79a8e70 "Collectable %p in fromspace accessed") at src/core/exceptions.c:855
#1 0x00007ffff771235c in check_reg (tc=0x2000a120180, reg_base=0x200100c1c18, idx=20) at src/core/interp.c:13
#2 0x00007ffff7712da5 in MVM_interp_run (tc=0x2000a120180, initial_invoke=0x7ffff7779736 <thread_initial_invoke>, invoke_data=0x2000a0e5340, outer_runloop=0x0) at src/core/interp.c:231
#3 0x00007ffff77798e9 in start_thread (data=0x2000a0e5340) at src/core/threads.c:101
#4 0x00007ffff734eac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#5 0x00007ffff73e0850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) f 1
#1 0x00007ffff771235c in check_reg (tc=0x2000a120180, reg_base=0x200100c1c18, idx=20) at src/core/interp.c:13
13 MVM_ASSERT_NOT_FROMSPACE(tc, reg_base[idx].o);
(gdb) p MVM_dump_bytecode(tc)
00000 getcode loc_20_obj, Frame_21061
00001 capturelex loc_20_obj
00002 getcode loc_20_obj, Frame_21062
00003 capturelex loc_20_obj
00004 checkarity 1, 1
00005 param_rp_o loc_6_obj, 0
00006 dispatch_o loc_20_obj, 'lang-hllize', Callsite_1, loc_6_obj
00007 set loc_6_obj, loc_20_obj
00008 decont loc_20_obj, loc_6_obj
00009 set loc_25_obj, loc_20_obj
00010 wval loc_20_obj, 1, 29
00011 istype loc_17_int, loc_25_obj, loc_20_obj
00012 assertparamcheck loc_17_int
00013 bindlex lex_Frame_21060_lex4_obj, loc_25_obj
00014 param_sn loc_7_obj
annotation: SETTING::src/core.c/ThreadPoolScheduler.rakumod:405
00015 getcode loc_4_obj, Frame_21061
00016 getcode loc_5_obj, Frame_21062
00017 wval loc_8_obj, 0, 28
00018 create loc_8_obj, loc_8_obj
00019 wval loc_9_obj, 0, 28
00020 wval_wide loc_10_obj, 1, 73302
00021 bindattr_o loc_8_obj, loc_9_obj, '$!descriptor', loc_10_obj, -1
00022 wval loc_10_obj, 0, 28
00023 wval loc_9_obj, 0, 24
00024 bindattr_o loc_8_obj, loc_10_obj, '$!value', loc_9_obj, -1
00025 set loc_2_obj, loc_8_obj
annotation: SETTING::src/core.c/ThreadPoolScheduler.rakumod:406
00026 getlex loc_8_obj, lex_Frame_21060_lex4_obj
00027 wval loc_9_obj, 1, 29
00028 getattr_o loc_10_obj, loc_8_obj, loc_9_obj, '$!affinity-workers', 6
00029 bindlex lex_Frame_21060_lex7_obj, loc_10_obj
00030 elems loc_11_int, loc_10_obj
00031 if_i loc_11_int, label_1(00048)
00032 getlex loc_10_obj, lex_Frame_21060_lex4_obj
00033 wval loc_9_obj, 1, 29
00034 getattr_o loc_8_obj, loc_10_obj, loc_9_obj, '$!state-lock', 1
00035 decont loc_9_obj, loc_8_obj
00036 const_s loc_12_str, 'protect'
00037 wval_wide loc_10_obj, 1, 73296
00038 decont loc_13_obj, loc_10_obj
00039 const_s loc_14_str, 'clone'
00040 dispatch_o loc_10_obj, 'lang-meth-call', Callsite_4, loc_13_obj, loc_14_str, loc_10_obj
00041 dispatch_v 'raku-capture-lex', Callsite_1, loc_10_obj
00042 dispatch_o loc_10_obj, 'lang-meth-call', Callsite_2, loc_9_obj, loc_12_str, loc_8_obj, loc_10_obj
00043 dispatch_o loc_8_obj, 'lang-hllize', Callsite_1, loc_10_obj
00044 getlex loc_10_obj, lex_Frame_21060_lex4_obj
00045 wval loc_9_obj, 1, 29
00046 getattr_o loc_13_obj, loc_10_obj, loc_9_obj, '$!affinity-workers', 6
00047 bindlex lex_Frame_21060_lex7_obj, loc_13_obj
label_1:
00048 const_i64_16 loc_11_int, -1
00049 bindlex lex_Frame_21060_lex6_int, loc_11_int
label_2:
00050 getlex loc_15_int, lex_Frame_21060_lex6_int
00051 const_i64_16 loc_16_int, 1
00052 add_i loc_16_int, loc_15_int, loc_16_int
00053 bindlex lex_Frame_21060_lex6_int, loc_16_int
00054 getlex loc_9_obj, lex_Frame_21060_lex7_obj
00055 elems loc_15_int, loc_9_obj
00056 lt_i loc_15_int, loc_16_int, loc_15_int
00057 unless_i loc_15_int, label_7(00103)
00058 osrpoint
00059 decont loc_9_obj, loc_2_obj
00060 isconcrete loc_16_int, loc_9_obj
00061 unless_i loc_16_int, label_5(00098)
00062 getlex loc_9_obj, lex_Frame_21060_lex7_obj
00063 getlex loc_17_int, lex_Frame_21060_lex6_int
00064 atpos_o loc_9_obj, loc_9_obj, loc_17_int
00065 set loc_1_obj, loc_9_obj
00066 decont loc_9_obj, loc_1_obj
00067 const_s loc_12_str, 'queue'
00068 dispatch_o loc_9_obj, 'lang-meth-call', Callsite_6, loc_9_obj, loc_12_str, loc_1_obj
00069 dispatch_o loc_10_obj, 'lang-hllize', Callsite_1, loc_9_obj
00070 set loc_0_obj, loc_10_obj
00071 elems loc_17_int, loc_0_obj
00072 if_i loc_17_int, label_3(00084)
00073 decont loc_10_obj, loc_1_obj
00074 const_s loc_12_str, 'working'
00075 dispatch_o loc_10_obj, 'lang-meth-call', Callsite_6, loc_10_obj, loc_12_str, loc_1_obj
00076 dispatch_o loc_9_obj, 'lang-hllize', Callsite_1, loc_10_obj
00077 decont loc_10_obj, loc_9_obj
00078 dispatch_i loc_18_int, 'boot-boolify', Callsite_1, loc_10_obj
00079 if_i loc_18_int, label_3(00084)
00080 const_s loc_12_str, '&return'
00081 getlexstatic_o loc_10_obj, loc_12_str
00082 decont loc_10_obj, loc_10_obj
00083 dispatch_v 'lang-call', Callsite_11, loc_10_obj, loc_0_obj
label_3:
00084 elems loc_17_int, loc_0_obj
00085 decont loc_9_obj, loc_2_obj
00086 const_s loc_12_str, 'queue'
00087 dispatch_o loc_9_obj, 'lang-meth-call', Callsite_6, loc_9_obj, loc_12_str, loc_2_obj
00088 dispatch_o loc_10_obj, 'lang-hllize', Callsite_1, loc_9_obj
00089 elems loc_18_int, loc_10_obj
00090 lt_i loc_18_int, loc_17_int, loc_18_int
00091 hllboxtype_i loc_9_obj
00092 box_i loc_9_obj, loc_18_int, loc_9_obj
00093 set loc_10_obj, loc_9_obj
00094 unless_i loc_18_int, label_4(00097)
00095 set loc_2_obj, loc_1_obj
00096 set loc_10_obj, loc_2_obj
label_4:
00097 goto label_6(00102)
label_5:
00098 getlex loc_19_obj, lex_Frame_21060_lex7_obj
00099 getlex loc_18_int, lex_Frame_21060_lex6_int
00100 atpos_o loc_19_obj, loc_19_obj, loc_18_int
00101 set loc_2_obj, loc_19_obj
label_6:
00102 goto label_2(00050)
label_7:
00103 decont loc_19_obj, loc_2_obj
00104 const_s loc_12_str, 'queue'
00105 dispatch_o loc_19_obj, 'lang-meth-call', Callsite_6, loc_19_obj, loc_12_str, loc_2_obj
00106 dispatch_o loc_20_obj, 'lang-hllize', Callsite_1, loc_19_obj
00107 bindlex lex_Frame_21060_lex5_obj, loc_20_obj
00108 elems loc_16_int, loc_20_obj
00109 getlex loc_20_obj, lex_Frame_21060_lex7_obj
00110 elems loc_18_int, loc_20_obj
00111 getlex loc_17_int, lex_Frame_21029_lex2_int
00112 lt_i loc_17_int, loc_18_int, loc_17_int
00113 unless_i loc_17_int, label_8(00122)
00114 getlex loc_20_obj, lex_Frame_21029_lex3_obj
00115 getlex loc_19_obj, lex_Frame_21060_lex7_obj
00116 elems loc_18_int, loc_19_obj
00117 atpos_i loc_18_int, loc_20_obj, loc_18_int
00118 hllboxtype_i loc_21_obj
00119 box_i loc_21_obj, loc_18_int, loc_21_obj
00120 set loc_19_obj, loc_21_obj
00121 goto label_9(00124)
label_8:
00122 getlex loc_20_obj, lex_Frame_21029_lex1_obj
00123 set loc_19_obj, loc_20_obj
label_9:
00124 decont_i loc_17_int, loc_19_obj
00125 le_i loc_17_int, loc_16_int, loc_17_int
00126 unless_i loc_17_int, label_10(00130)
00127 getlex loc_19_obj, lex_Frame_21060_lex5_obj
00128 set loc_20_obj, loc_19_obj
00129 goto label_11(00143)
label_10:
00130 getlex loc_20_obj, lex_Frame_21060_lex4_obj
00131 wval loc_22_obj, 1, 29
00132 getattr_o loc_23_obj, loc_20_obj, loc_22_obj, '$!state-lock', 1
00133 decont loc_22_obj, loc_23_obj
00134 const_s loc_12_str, 'protect'
00135 wval_wide loc_20_obj, 1, 73310
00136 decont loc_24_obj, loc_20_obj
00137 const_s loc_14_str, 'clone'
00138 dispatch_o loc_20_obj, 'lang-meth-call', Callsite_4, loc_24_obj, loc_14_str, loc_20_obj
00139 dispatch_v 'raku-capture-lex', Callsite_1, loc_20_obj
00140 dispatch_o loc_20_obj, 'lang-meth-call', Callsite_2, loc_22_obj, loc_12_str, loc_23_obj, loc_20_obj
00141 dispatch_o loc_23_obj, 'lang-hllize', Callsite_1, loc_20_obj
00142 set loc_20_obj, loc_23_obj
label_11:
00143 dispatch_o loc_23_obj, 'raku-rv-decont', Callsite_1, loc_20_obj
00144 goto label_12(00147)
00145 -> lastexpayload loc_20_obj
00146 set loc_23_obj, loc_20_obj
label_12:
00147 return_o loc_23_obj
$2 = void
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment