Skip to content

Instantly share code, notes, and snippets.

@samcv
Created September 17, 2018 02:51
Show Gist options
  • Save samcv/927ebf8b4a1c3ae71117587d9da00d34 to your computer and use it in GitHub Desktop.
Save samcv/927ebf8b4a1c3ae71117587d9da00d34 to your computer and use it in GitHub Desktop.
t/moar/12-decodelocaltime.t ............ ok
t/moar/02-qast-references.t ............ ok
t/moar/10-eqatim.t ..................... ok
t/p5regex/01-p5regex.t ................. ok
t/moar/50-jit-register-alloc.t ......... ok
t/moar/51-jit-div_i.t .................. ok
t/hll/06-sprintf.t ..................... ok
t/nativecall/01-basic.t ................ ok
t/serialization/03-closures.t .......... ok
t/concurrency/01-thread.t .............. ok
t/serialization/04-repossession.t ...... ok
t/concurrency/04-osr-crash.t ........... ok
t/serialization/02-types.t ............. ok
===( 11164;21 463/? 0/? 20/66 0/? 7/15 10/12 )==================================================================================
==246099==ERROR: AddressSanitizer: heap-use-after-free on address 0x618000210288 at pc 0x7fee58da276a bp 0x7fee545fbde0 sp 0x7fee545fbdd8
WRITE of size 8 at 0x618000210288 thread T1
#0 0x7fee58da2769 in save_or_free_sim_stack /home/samantha/git/MoarVM/src/spesh/stats.c:508:37
#1 0x7fee58da2769 in MVM_spesh_stats_update /home/samantha/git/MoarVM/src/spesh/stats.c:630
#2 0x7fee58d9ad6d in worker /home/samantha/git/MoarVM/src/spesh/worker.c:16:5
#3 0x7fee58c6d445 in invoke_handler /home/samantha/git/MoarVM/src/6model/reprs/MVMCFunction.c:9:9
#4 0x7fee58ba4a9d in thread_initial_invoke /home/samantha/git/MoarVM/src/core/threads.c:59:5
#5 0x7fee58b595b0 in MVM_interp_run /home/samantha/git/MoarVM/src/core/interp.c:92:5
#6 0x7fee58ba3d13 in start_thread /home/samantha/git/MoarVM/src/core/threads.c:87:5
#7 0x7fee57e1fac5 (/lib64/libpthread.so.0+0x7ac5)
#8 0x7fee571d48be in clone (/lib64/libc.so.6+0x1098be)
0x618000210288 is located 520 bytes inside of 800-byte region [0x618000210080,0x6180002103a0)
freed by thread T4 here:
#0 0x4ba692 in __interceptor_free /var/tmp/portage/sys-libs/compiler-rt-sanitizers-6.0.1/work/compiler-rt-6.0.1.src/lib/asan/asan_malloc_linux.cc:83:3
#1 0x7fee58b7aa33 in MVM_free /home/samantha/git/MoarVM/src/core/alloc.h:40:5
#2 0x7fee58b7aa33 in MVM_tc_destroy /home/samantha/git/MoarVM/src/core/threadcontext.c:113
#3 0x7fee58c002d3 in run_gc /home/samantha/git/MoarVM/src/gc/orchestrate.c:221:13
#4 0x7fee58bfefb2 in MVM_gc_enter_from_allocator /home/samantha/git/MoarVM/src/gc/orchestrate.c:526:9
#5 0x7fee58c00e03 in MVM_gc_allocate_nursery /home/samantha/git/MoarVM/src/gc/allocation.c:35:13
#6 0x7fee58c00e03 in MVM_gc_allocate /home/samantha/git/MoarVM/src/gc/allocation.h:18
#7 0x7fee58c00e03 in MVM_gc_allocate_zeroed /home/samantha/git/MoarVM/src/gc/allocation.c:52
#8 0x7fee58c01ad3 in MVM_gc_allocate_object /home/samantha/git/MoarVM/src/gc/allocation.c:89:5
#9 0x7fee58c4e1bb in MVM_repr_alloc_init /home/samantha/git/MoarVM/src/6model/reprconv.c:17:22
#10 0x7fee58de2b81 in MVM_string_concatenate /home/samantha/git/MoarVM/src/strings/ops.c:903:5
#11 0x7fee58b6bd50 in MVM_interp_run /home/samantha/git/MoarVM/src/core/interp.c:1543:40
#12 0x7fee58ba3d13 in start_thread /home/samantha/git/MoarVM/src/core/threads.c:87:5
#13 0x7fee57e1fac5 (/lib64/libpthread.so.0+0x7ac5)
previously allocated by thread T0 here:
#0 0x4bac0a in calloc /var/tmp/portage/sys-libs/compiler-rt-sanitizers-6.0.1/work/compiler-rt-6.0.1.src/lib/asan/asan_malloc_linux.cc:114:3
#1 0x7fee58b7a2c2 in MVM_calloc /home/samantha/git/MoarVM/src/core/alloc.h:11:17
#2 0x7fee58b7a2c2 in MVM_tc_create /home/samantha/git/MoarVM/src/core/threadcontext.c:8
#3 0x7fee58ba2f96 in MVM_thread_new /home/samantha/git/MoarVM/src/core/threads.c:29:5
#4 0x7fee58b6d80b in MVM_interp_run /home/samantha/git/MoarVM/src/core/interp.c:3648:40
#5 0x7fee58e63666 in MVM_vm_run_file /home/samantha/git/MoarVM/src/moar.c:420:5
#6 0x4e7d51 in main /home/samantha/git/MoarVM/src/main.c:300:10
#7 0x7fee570ec10c in __libc_start_main (/lib64/libc.so.6+0x2110c)
Thread T1 created by T0 here:
#0 0x4a3a5d in __interceptor_pthread_create /var/tmp/portage/sys-libs/compiler-rt-sanitizers-6.0.1/work/compiler-rt-6.0.1.src/lib/asan/asan_interceptors.cc:204:3
#1 0x7fee58ef394c in uv_thread_create /home/samantha/git/MoarVM/3rdparty/libuv/src/unix/thread.c:202:9
#2 0x7fee58ba396c in MVM_thread_run /home/samantha/git/MoarVM/src/core/threads.c:162:18
#3 0x7fee58d9a504 in MVM_spesh_worker_setup /home/samantha/git/MoarVM/src/spesh/worker.c:156:9
#4 0x7fee58e62407 in MVM_vm_create_instance /home/samantha/git/MoarVM/src/moar.c:365:5
#5 0x4e7c26 in main /home/samantha/git/MoarVM/src/main.c:275:18
#6 0x7fee570ec10c in __libc_start_main (/lib64/libc.so.6+0x2110c)
Thread T4 created by T0 here:
#0 0x4a3a5d in __interceptor_pthread_create /var/tmp/portage/sys-libs/compiler-rt-sanitizers-6.0.1/work/compiler-rt-6.0.1.src/lib/asan/asan_interceptors.cc:204:3
#1 0x7fee58ef394c in uv_thread_create /home/samantha/git/MoarVM/3rdparty/libuv/src/unix/thread.c:202:9
#2 0x7fee58ba396c in MVM_thread_run /home/samantha/git/MoarVM/src/core/threads.c:162:18
#3 0x7fee58b74302 in MVM_interp_run /home/samantha/git/MoarVM/src/core/interp.c:3959:17
#4 0x7fee58e63666 in MVM_vm_run_file /home/samantha/git/MoarVM/src/moar.c:420:5
#5 0x4e7d51 in main /home/samantha/git/MoarVM/src/main.c:300:10
#6 0x7fee570ec10c in __libc_start_main (/lib64/libc.so.6+0x2110c)
SUMMARY: AddressSanitizer: heap-use-after-free /home/samantha/git/MoarVM/src/spesh/stats.c:508:37 in save_or_free_sim_stack
Shadow bytes around the buggy address:
0x0c308003a000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c308003a010: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c308003a020: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c308003a030: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c308003a040: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c308003a050: fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c308003a060: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c308003a070: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa
0x0c308003a080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c308003a090: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c308003a0a0: fd fd fd fd fd fd fd fd fd fd fd fd 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
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==246099==ABORTING
t/concurrency/02-lock.t ................ Dubious, test returned 1 (wstat 256, 0x100)
Failed 8/15 subtests
t/serialization/01-basic.t ............. ok
t/qast/01-qast.t ....................... ok
t/qregex/01-qregex.t ................... ok
t/concurrency/03-semaphore.t ........... ok
t/moar/52-pluggable-spesh.t ............ ok
Test Summary Report
-------------------
t/concurrency/02-lock.t (Wstat: 256 Tests: 7 Failed: 0)
Non-zero exit status: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment