Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Last active October 3, 2021 16:54
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 dogbert17/a07d0bb2340e37e250106866c9d6dc8c to your computer and use it in GitHub Desktop.
Save dogbert17/a07d0bb2340e37e250106866c9d6dc8c to your computer and use it in GitHub Desktop.
t/02-rakudo/15-gh_1202.t SEGV version
dogbert@dogbert-VirtualBox:~/repos/rakudo$ gdb install/bin/moar core.moar.1000.76f4e7648b41411e930b2edf5cc63bb4.2709599.1633277864000000000000
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from install/bin/moar...
[New LWP 2709605]
[New LWP 2709602]
[New LWP 2709601]
[New LWP 2709606]
[New LWP 2709599]
[New LWP 2709613]
[New LWP 2709600]
[New LWP 2709615]
[New LWP 2709604]
[New LWP 2709610]
[New LWP 2709607]
[New LWP 2709603]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/dogbert/repos/rakudo/nqp/MoarVM/../../install/bin/moar --execname=/home/d'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f957c2e8d40 in MVM_disp_program_run (tc=0x7f95640fa270, dp=0x55bdd74515c0, record=0x7f9560061be8, spesh_cid=0, bytecode_offset=200, dp_index=3) at src/disp/program.c:2933
2933 if (STABLE(val.o) != (MVMSTable *)dp->gc_constants[op.arg_guard.checkee])
[Current thread is 1 (Thread 0x7f9571ffb700 (LWP 2709605))]
(gdb) bt
#0 0x00007f957c2e8d40 in MVM_disp_program_run (tc=0x7f95640fa270, dp=0x55bdd74515c0, record=0x7f9560061be8, spesh_cid=0, bytecode_offset=200, dp_index=3) at src/disp/program.c:2933
#1 0x00007f957c2dcc0f in dispatch_polymorphic (tc=0x7f95640fa270, entry_ptr=0x55bdd975f388, seen=0x55bdda340a28, id=0x55bdd91560f0, callsite=0x55bdd6fd67c0, arg_indices=0x7f9578bb5286,
source=0x7f9560085940, sf=0x55bdd9152d90, bytecode_offset=200) at src/disp/inline_cache.c:178
#2 0x00007f957c20bd3c in MVM_interp_run (tc=0x7f95640fa270, initial_invoke=0x7f957c22e7d5 <thread_initial_invoke>, invoke_data=0x7f95640d4d70, outer_runloop=0x0) at src/core/interp.c:5442
#3 0x00007f957c22e96e in start_thread (data=0x7f95640d4d70) at src/core/threads.c:101
#4 0x00007f957bc69609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#5 0x00007f957bef4293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) l
2928 num_resume_states++;
2929 NEXT;
2930 /* Argument guard ops. */
2931 OP(MVMDispOpcodeGuardArgType): {
2932 GET_ARG;
2933 if (STABLE(val.o) != (MVMSTable *)dp->gc_constants[op.arg_guard.checkee])
2934 goto rejection;
2935 NEXT;
2936 }
2937 OP(MVMDispOpcodeGuardArgTypeConc): {
(gdb) p val
$1 = {o = 0x0, s = 0x0, i8 = 0 '\000', u8 = 0 '\000', i16 = 0, u16 = 0, i32 = 0, u32 = 0, i64 = 0, u64 = 0, n32 = 0, n64 = 0}
(gdb) p *dp
$2 = {constants = 0x55bdd7451830, gc_constants = 0x55bdd7451230, num_gc_constants = 2, num_temporaries = 2, first_args_temporary = 1, num_ops = 5, ops = 0x55bdd7451530, resumptions = 0x0,
num_resumptions = 0}
(gdb) p op
$3 = {code = MVMDispOpcodeGuardArgType, {resume = {disp = 0x7be60000}, resume_init_callsite = {callsite_idx = 2078670848}, arg_guard = {arg_idx = 0, checkee = 0}, temp_guard = {temp = 2078670848,
checkee = 0}, load = {temp = 2078670848, idx = 0}, bind_control_resumption = {failure_flag = 2078670848, success_flag = 0}, use_arg_tail = {skip_args = 2078670848, callsite_idx = 0},
copy_arg_tail = {tail_args = 2078670848, callsite_idx = 0}, res_value = {temp = 2078670848}, res_code = {temp_invokee = 2078670848}}}
(gdb) p *dp->constants
$4 = {cs = 0x7f957c812a20 <obj_callsite>, hll = 0x7f957c812a20 <obj_callsite>, i64 = 140280015694368, n64 = 6.9307536552658127e-310}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment