Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Last active March 13, 2017 17:33
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/8e96d144505ae8c0434242a852f607d0 to your computer and use it in GitHub Desktop.
Save dogbert17/8e96d144505ae8c0434242a852f607d0 to your computer and use it in GitHub Desktop.
ASAN output with MVM_SPESH_NODELAY=1
dogbert@dogbert-VirtualBox ~/repos/rakudo $ ./perl6-m t/spec/S06-currying/slurpy.t
1..32
ok 1 - Priming :(*@b) with \() gave :(*@b)
ok 2 - Priming :(*@b) with \(1) gave :(*@b)
ok 3 - Priming :(*@b) with \(1, *) gave :(*@b)
ok 4 - Priming :(*@b) with \(*, 2) gave :(*@b)
ok 5 - Priming :(*@b) with \(1, *, 2) gave :(*@b)
ok 6 - Priming :($a, *@b) with \(1, 2, Nil, 3) gave :(*@b)
ok 7 - Priming :(*@b) with \(1, Nil) gave :(*@b)
ok 8 - Priming :(*@b) with \(Nil, 2) gave :(*@b)
ok 9 - Priming :(*@b) with \(1, Nil, 2) gave :(*@b)
ok 10 - Priming :($a, *@b) with \(1) gave :(*@b)
ok 11 - Priming :($a, *@b) with \(1, 2) gave :(*@b)
ok 12 - Priming :($a, *@b) with \(1, 2, *, 3) gave :(*@b)
ok 13 - Priming :(:$a, *%B, :$b, *%C, :$c) with \(:a) gave :(:$a, *%B, :$b, *%C, :$c)
ok 14 - Priming :(:$a!, *%B, :$b!, *%C, :$c!) with \(:a) gave :(:$a, *%B, :$b!, *%C, :$c!)
ok 15 - &anonslurp.assuming(().Seq)((1, 2, "c", Bool::True, Bool::True).Seq) returned expected value ["a1 b2"]
ok 16 - &anonslurp.assuming((1,).Seq)((2, "c", Bool::True, Bool::True).Seq) returned expected value ["a1 b2"]
ok 17 - &anonslurp.assuming((1, 2).Seq)(("c", Bool::True, Bool::True).Seq) returned expected value ["a1 b2"]
ok 18 - &anonslurp.assuming((1, 2, Bool::True).Seq)(("c", Bool::True).Seq) returned expected value ["a1 b2"]
=================================================================
==14915== ERROR: AddressSanitizer: heap-use-after-free on address 0x96fbdc70 at pc 0xb582f03f bp 0xbfd6f4b8 sp 0xbfd6f4ac
READ of size 4 at 0x96fbdc70 thread T0
#0 0xb582f03e in gc_mark /home/dogbert/repos/rakudo/nqp/MoarVM/src/6model/reprs/MVMCallCapture.c:50
#1 0xb577aa70 in MVM_gc_mark_collectable /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/collect.c:399
#2 0xb577cd03 in process_worklist /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/collect.c:313
#3 0xb577e4a8 in MVM_gc_collect /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/collect.c:129
#4 0xb5769eb5 in run_gc /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/orchestrate.c:335
#5 0xb576c9fd in MVM_gc_enter_from_allocator /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/orchestrate.c:463
#6 0xb576dad7 in MVM_gc_allocate_nursery /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/allocation.c:32
#7 0xb576dbf9 in MVM_gc_allocate /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/allocation.h:13
#8 0xb576dbf9 in MVM_gc_allocate_zeroed /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/allocation.c:49
#9 0xb56bea34 in MVM_interp_run /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/interp.c:5353
#10 0xb59fe2f2 in MVM_vm_run_file /home/dogbert/repos/rakudo/nqp/MoarVM/src/moar.c:310
#11 0x8049125 in main /home/dogbert/repos/rakudo/nqp/MoarVM/src/main.c:212
#12 0xb538eaf2 (/lib/i386-linux-gnu/libc.so.6+0x19af2)
#13 0x8049273 in _start (/home/dogbert/repos/rakudo/install/bin/moar+0x8049273)
0x96fbdc70 is located 0 bytes inside of 20-byte region [0x96fbdc70,0x96fbdc84)
freed by thread T0 here:
#0 0xb6174774 (/usr/lib/i386-linux-gnu/libasan.so.0+0x16774)
#1 0xb582e3fb in MVM_free /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/alloc.h:29
#2 0xb582e3fb in gc_free /home/dogbert/repos/rakudo/nqp/MoarVM/src/6model/reprs/MVMCallCapture.c:77
#3 0xb577ec17 in MVM_gc_collect_free_nursery_uncopied /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/collect.c:580
#4 0xb576a5bd in run_gc /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/orchestrate.c:359
#5 0xb576c9fd in MVM_gc_enter_from_allocator /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/orchestrate.c:463
#6 0xb576dad7 in MVM_gc_allocate_nursery /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/allocation.c:32
#7 0xb576dbf9 in MVM_gc_allocate /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/allocation.h:13
#8 0xb576dbf9 in MVM_gc_allocate_zeroed /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/allocation.c:49
#9 0xb576e636 in MVM_gc_allocate_frame /home/dogbert/repos/rakudo/nqp/MoarVM/src/gc/allocation.c:99
#10 0xb5707785 in allocate_heap_frame /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/frame.c:269
#11 0xb5707785 in MVM_frame_create_for_deopt /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/frame.c:732
#12 0xb5913806 in uninline /home/dogbert/repos/rakudo/nqp/MoarVM/src/spesh/deopt.c:34
#13 0xb59177a6 in MVM_spesh_deopt_all /home/dogbert/repos/rakudo/nqp/MoarVM/src/spesh/deopt.c:320
#14 0xb568dae3 in MVM_interp_run /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/interp.c:1808
#15 0xb59fe2f2 in MVM_vm_run_file /home/dogbert/repos/rakudo/nqp/MoarVM/src/moar.c:310
#16 0x8049125 in main /home/dogbert/repos/rakudo/nqp/MoarVM/src/main.c:212
#17 0xb538eaf2 (/lib/i386-linux-gnu/libc.so.6+0x19af2)
previously allocated by thread T0 here:
#0 0xb6174905 (/usr/lib/i386-linux-gnu/libasan.so.0+0x16905)
#1 0xb5668207 in MVM_calloc /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/alloc.h:11
#2 0xb5668207 in MVM_args_copy_callsite /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/args.c:46
#3 0xb566863d in MVM_args_proc_to_callsite /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/args.c:77
#4 0xb566887e in MVM_args_save_capture /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/args.c:104
#5 0xb568acea in MVM_interp_run /home/dogbert/repos/rakudo/nqp/MoarVM/src/core/interp.c:1265
#6 0xb59fe2f2 in MVM_vm_run_file /home/dogbert/repos/rakudo/nqp/MoarVM/src/moar.c:310
#7 0x8049125 in main /home/dogbert/repos/rakudo/nqp/MoarVM/src/main.c:212
#8 0xb538eaf2 (/lib/i386-linux-gnu/libc.so.6+0x19af2)
SUMMARY: AddressSanitizer: heap-use-after-free /home/dogbert/repos/rakudo/nqp/MoarVM/src/6model/reprs/MVMCallCapture.c:50 gc_mark
Shadow bytes around the buggy address:
0x32df7b30: 00 00 fa fa fd fd fd fd fa fa fd fd fd fd fa fa
0x32df7b40: 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00
0x32df7b50: fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00
0x32df7b60: 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa
0x32df7b70: fd fd fd fd fa fa 00 00 00 00 fa fa 00 00 00 00
=>0x32df7b80: fa fa fd fd fd fd fa fa fd fd fd fd fa fa[fd]fd
0x32df7b90: fd fa fa fa fd fd fd fd fa fa fd fd fd fd fa fa
0x32df7ba0: fd fd fd fd fa fa fd fd fd fa fa fa 00 00 04 fa
0x32df7bb0: fa fa fd fd fd fd fa fa fd fd fd fd fa fa 00 00
0x32df7bc0: 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa
0x32df7bd0: 00 00 00 00 fa fa fd fd fd fd fa fa fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap righ redzone: fb
Freed Heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
ASan internal: fe
==14915== ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment