Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created December 14, 2016 14:50
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/93a8ce5f6cbb9cc016cb668c30b7d42c to your computer and use it in GitHub Desktop.
Save dogbert17/93a8ce5f6cbb9cc016cb668c30b7d42c to your computer and use it in GitHub Desktop.
t/spec/S17-supply/syntax.t
dogbert@dogbert-VirtualBox ~/repos/rakudo $ gdb --args /home/dogbert/repos/rakudo/install/bin/moar --libpath="/home/dogbert/repos/rakudo/install/share/nqp/lib" --libpath="." /home/dogbert/repos/rakudo/perl6.moarvm -I lib t/spec/S17-supply/syntax.t
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 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 "i686-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 /home/dogbert/repos/rakudo/install/bin/moar...done.
(gdb) break MVM_panic
Function "MVM_panic" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (MVM_panic) pending.
(gdb) r
Starting program: /home/dogbert/repos/rakudo/install/bin/moar --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm -I lib t/spec/S17-supply/syntax.t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
1..68
ok 1 - Got two values emitted by supply
ok 2 - First value correct
ok 3 - Second value correct
ok 4 - Tapping the supply another time works
ok 5 - Only the one emit ran, due to done
ok 6 - Got correct value emitted
ok 7 - Did not continue running code after done
ok 8 - Block with emit then done runs emit subscription once
ok 9 - Block with emit then done runs done subscription once
ok 10 - Block with emit then done never runs quit subscription
ok 11 - Block with emit runs emit subscription once
ok 12 - Block with emit runs done subscription once (automatically)
ok 13 - Block with emit never runs quit subscription
ok 14 - Block with emit then die runs emit subscription once
ok 15 - Block with emit then die never runs done subscription once
ok 16 - Block with emit then die runs quit subscription once
ok 17 - whenever loop ran and emitted first event into supply...
ok 18 - ...and emitted correct first value
ok 19 - whenever loop ran and emitted second event into supply...
ok 20 - ...and emitted correct second value
ok 21 - done not run automatically when there is a whenever
ok 22 - no unexpected quit when there is a whenever
ok 23 - done is run if the whenever gets done
ok 24 - still no unexpected quit
ok 25 - whenever loop produced three values
ok 26 - First value from loop iteration correct
ok 27 - Second value from loop iteration correct
ok 28 - Value from LAST block correct
ok 29 - Multiple whenevers run concurrently
ok 30 - supply block with two whenevers then done runs its done
ok 31 - first whenever closes its supply due to the done
ok 32 - second whenever closes its supply due to the done
ok 33 - take-until style supply emitted correct values
ok 34 - take-until style supply is done after second supply emits
ok 35 - first supply tapped was closed
ok 36 - second supply tapped was closed
ok 37 - supply block with two whenevers starts out not done
ok 38 - still not done after one whenever gets done
ok 39 - but done after all whenevers get done
ok 40 - supply block with whenever that gets a quit emits no values
ok 41 - supply block with whenever that gets a quit is not done
ok 42 - supply block with whenever that gets a quit does quit
ok 43 - emits up to, and emit in a QUIT block, all came out OK
ok 44 - done inside of matched QUIT block worked
ok 45 - did not produce a quit, since exception handled
ok 46 - supply with one whenever that quits but handles it will be done
ok 47 - ...and the handled exception will not cause a quit
ok 48 - supply with one whenever that quits, and QUIT does not match, will still quit
ok 49 - ...and done will not be run
ok 50 - react/whenever with supply that immediately emits values works
[New Thread 0xb6600b40 (LWP 11022)]
[New Thread 0xb5bffb40 (LWP 11023)]
ok 51 - Can only be in one whatever block at a time
1..3
ok 1 - 'emit 42' died
ok 2 - right exception type (X::ControlFlow)
ok 3 - .illegal matches emit
ok 52 - did we throws-like X::ControlFlow?
1..3
ok 1 - 'done' died
ok 2 - right exception type (X::ControlFlow)
ok 3 - .illegal matches done
ok 53 - did we throws-like X::ControlFlow?
[New Thread 0xb53feb40 (LWP 11024)]
Breakpoint 1, MVM_panic (exitCode=1, messageFormat=0xb72898e4 "Collectable %p in fromspace accessed") at src/core/exceptions.c:781
781 fprintf(stderr, "MoarVM panic: ");
(gdb) bt
#0 MVM_panic (exitCode=1, messageFormat=0xb72898e4 "Collectable %p in fromspace accessed") at src/core/exceptions.c:781
#1 0xb72888fb in finish_store (tc=0x804c450, cont=0x81045dc, obj=0xac87cc8) at src/vm/moar/ops/container.c:38
#2 0xb7289133 in rakudo_scalar_store (tc=0x804c450, cont=0x81045dc, obj=0xac87cc8) at src/vm/moar/ops/container.c:169
#3 0xb7cc8d89 in MVM_interp_run (tc=0x804c450, initial_invoke=0xb7dc8fd8 <toplevel_initial_invoke>, invoke_data=0x809bcc8) at src/core/interp.c:2843
#4 0xb7dc9107 in MVM_vm_run_file (instance=0x804c008, filename=0xbffff2d4 "/home/dogbert/repos/rakudo/perl6.moarvm") at src/moar.c:309
#5 0x08048ea6 in main (argc=7, argv=0xbffff084) at src/main.c:192
(gdb) frame 1
#1 0xb72888fb in finish_store (tc=0x804c450, cont=0x81045dc, obj=0xac87cc8) at src/vm/moar/ops/container.c:38
38 MVM_ASSIGN_REF(tc, &(cont->header), rs->value, obj);
(gdb) p MVM_dump_backtrace(tc)
at <unknown>:1 (./CORE.setting.moarvm:)
from SETTING::src/core/Lock.pm:24 (./CORE.setting.moarvm:protect)
from SETTING::src/core/Supply.pm:1659 (./CORE.setting.moarvm:maybe-another)
from SETTING::src/core/Supply.pm:1642 (./CORE.setting.moarvm:)
from SETTING::src/core/Supply.pm:1663 (./CORE.setting.moarvm:maybe-another)
from SETTING::src/core/Supply.pm:1642 (./CORE.setting.moarvm:)
from SETTING::src/core/Supply.pm:1663 (./CORE.setting.moarvm:maybe-another)
from SETTING::src/core/Supply.pm:1642 (./CORE.setting.moarvm:)
from SETTING::src/core/Supply.pm:1663 (./CORE.setting.moarvm:maybe-another)
from SETTING::src/core/Supply.pm:1642 (./CORE.setting.moarvm:)
from SETTING::src/core/Supply.pm:1663 (./CORE.setting.moarvm:maybe-another)
from SETTING::src/core/Supply.pm:1642 (./CORE.setting.moarvm:)
from SETTING::src/core/Supply.pm:1663 (./CORE.setting.moarvm:maybe-another)
from SETTING::src/core/Supply.pm:1652 (./CORE.setting.moarvm:)
from SETTING::src/core/Supply.pm:1636 (./CORE.setting.moarvm:run-operation)
from SETTING::src/core/Supply.pm:1683 (./CORE.setting.moarvm:run-supply-code)
from SETTING::src/core/Supply.pm:1674 (./CORE.setting.moarvm:tap)
from SETTING::src/core/Supply.pm:77 (./CORE.setting.moarvm:tap)
from SETTING::src/core/Supply.pm:1774 (./CORE.setting.moarvm:REACT)
from t/spec/S17-supply/syntax.t:376 (<ephemeral file>:)
from t/spec/S17-supply/syntax.t:369 (<ephemeral file>:<unit>)
from t/spec/S17-supply/syntax.t:1 (<ephemeral file>:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp:1577 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/NQPHLL.nqp:1780 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)
from gen/moar/stage2/NQPHLL.nqp:1674 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from src/Perl6/Compiler.nqp:27 (./blib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:1648 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/main.nqp:47 (/home/dogbert/repos/rakudo/perl6.moarvm:MAIN)
from gen/moar/main.nqp:38 (/home/dogbert/repos/rakudo/perl6.moarvm:<mainline>)
from <unknown>:1 (/home/dogbert/repos/rakudo/perl6.moarvm:<main>)
from <unknown>:1 (/home/dogbert/repos/rakudo/perl6.moarvm:<entry>)
$1 = void
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment