Skip to content

Instantly share code, notes, and snippets.

@FROGGS

FROGGS/bt.sh Secret

Last active January 3, 2016 03:49
Show Gist options
  • Save FROGGS/abdcf476cb2edc1b47a2 to your computer and use it in GitHub Desktop.
Save FROGGS/abdcf476cb2edc1b47a2 to your computer and use it in GitHub Desktop.
ok 26 - Basic sanity 2
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79c9cee in MVM_interp_run (tc=tc@entry=0x603430, initial_invoke=initial_invoke@entry=0x7ffff7a19350 <toplevel_initial_invoke>, invoke_data=<optimized out>)
at src/core/interp.c:1988
1988 GET_REG(cur_op, 0).o = STABLE(GET_REG(cur_op, 2).o)->WHAT;
(gdb) bt full
#0 0x00007ffff79c9cee in MVM_interp_run (tc=tc@entry=0x603430, initial_invoke=initial_invoke@entry=0x7ffff7a19350 <toplevel_initial_invoke>,
invoke_data=<optimized out>) at src/core/interp.c:1988
op = <optimized out>
cur_op = 0x64cbf4c "\004"
bytecode_start = 0x64cbec0 "\214"
reg_base = 0x6297ef0
cu = 0x75ec80
cur_callsite = 0x3403150
#1 0x00007ffff7a199f9 in MVM_vm_run_file (instance=instance@entry=0x603010, filename=<optimized out>) at src/moar.c:176
start_frame = <optimized out>
tc = 0x603430
cu = 0x7ffff67ed758
#2 0x0000000000400ceb in main (argc=6, argv=0x7fffffffdd78) at src/main.c:146
instance = 0x603010
input_file = <optimized out>
lib_path = {0x7fffffffe150 "/home/froggs/dev/rakudo-moar/../nqp/install/languages/nqp/lib",
0x7fffffffe198 "/home/froggs/dev/rakudo-moar/../nqp/install/languages/perl6/lib",
0x7fffffffe1e2 "/home/froggs/dev/rakudo-moar/../nqp/install/languages/perl6/runtime", 0x0, 0xf0b2ff "", 0xc2 <Address 0xc2 out of bounds>,
0x1 <Address 0x1 out of bounds>,
0x400d6d <__libc_csu_init+93> "H\203\303\001H9\353u\352H\213\\$\bH\213l$\020L\213d$\030L\213l$ L\213t$(L\213|$0H\203\304\070\303\017\037\200"}
dump = 0
argi = <optimized out>
lib_path_i = 3
(gdb) p GET_REG(cur_op, 2)
$1 = {o = 0x0, s = 0x0, i8 = 0 '\000', ui8 = 0 '\000', i16 = 0, ui16 = 0, i32 = 0, ui32 = 0, i64 = 0, ui64 = 0, n32 = 0, n64 = 0}
class Scissor { }
class Paper { }
class Stone { }
multi wins(Scissor $x, Paper $y) { 1 } #OK not used
multi wins(::T $x, T $y) { 0 } #OK not used
multi wins($x, $y) { -1 } #OK not used
is wins(Scissor.new, Paper.new), 1, 'Basic sanity';
is wins(Paper.new, Paper.new), 0, 'multi dispatch with ::T generics';
is wins(Paper.new, Scissor.new), -1, 'fallback if there is a ::T variant';
# RT #114394
sub p($a, $b) { wins($a, $b) };
is p(Paper, Paper), 0, 'Type captures and containers mix (RT 114394)';
multi wins2(Scissor $x, Paper $y) { 1 } #OK not used
multi wins2($x, $y where { $x.WHAT.gist eq $y.WHAT.gist }) { 0 }
multi wins2($x, $y) { -1 } #OK not used
is wins2(Scissor.new, Paper.new), 1, 'Basic sanity 2';
is wins2(Paper.new, Paper.new), 0, 'multi dispatch with faked generics';
is wins2(Paper.new, Scissor.new), -1, 'fallback if there is a faked generic';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment