Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created January 14, 2022 10:02
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 MasterDuke17/72c0bdde47bdf2bf913ef59ad3cec7aa to your computer and use it in GitHub Desktop.
Save MasterDuke17/72c0bdde47bdf2bf913ef59ad3cec7aa to your computer and use it in GitHub Desktop.
[dan@alexandria rakudo]$ ASAN_OPTIONS="detect_leaks=0" LD_PRELOAD=/usr/lib/libasan.so ./rakudo-m -I lib t/spec/S17-promise/nonblocking-await.t
1..28
ok 1 - Recursion creating a deep await-tree completes correctly
# Subtest: Deep Promise tree conveys exception up to the top
1..3
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 3 - .message matches oopsy
ok 2 - Deep Promise tree conveys exception up to the top
ok 3 - Hundreds of time-based Promises awaited completes correctly
ok 4 - await of multiple Promises suspends until all ready
ok 5 - Hundred of await on time/manual Promise completes corectly
ok 6 - await of multiple Promises suspends until all ready
# Subtest: Multiple await also conveys errors correctly
1..3
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 3 - .message matches bust
ok 7 - Multiple await also conveys errors correctly
=================================================================
==1003401==ERROR: AddressSanitizer: attempting double-free on 0x60300064b850 in thread T6:
#0 0x7f84445fef19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127
#1 0x7f84433ded4a in MVM_free src/core/alloc.h:62
#2 0x7f84433ded4a in MVM_alloc_safepoint src/core/alloc.h:102
#3 0x7f84433ded4a in finish_gc src/gc/orchestrate.c:191
#4 0x7f84433ded4a in run_gc src/gc/orchestrate.c:447
#5 0x7f84433e1ead in MVM_gc_enter_from_allocator src/gc/orchestrate.c:598
#6 0x7f84433e27d0 in MVM_gc_allocate_nursery src/gc/allocation.c:37
#7 0x7f84433e33a7 in MVM_gc_allocate src/gc/allocation.h:15
#8 0x7f84433e33a7 in MVM_gc_allocate_zeroed src/gc/allocation.h:21
#9 0x7f84433e33a7 in MVM_gc_allocate_object src/gc/allocation.c:86
#10 0x7f84433626be in MVM_frame_takeclosure src/core/frame.c:1144
#11 0x7f8443310999 in MVM_interp_run src/core/interp.c:1153
#12 0x7f844337db75 in start_thread src/core/threads.c:101
#13 0x7f84429b4258 in start_thread (/usr/lib/../lib/libpthread.so.0+0x9258)
#14 0x7f8442adc5e2 in __GI___clone (/usr/lib/libc.so.6+0xfe5e2)
0x60300064b850 is located 0 bytes inside of 32-byte region [0x60300064b850,0x60300064b870)
freed by thread T6 here:
#0 0x7f84445fef19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127
#1 0x7f84433ded4a in MVM_free src/core/alloc.h:62
#2 0x7f84433ded4a in MVM_alloc_safepoint src/core/alloc.h:102
#3 0x7f84433ded4a in finish_gc src/gc/orchestrate.c:191
#4 0x7f84433ded4a in run_gc src/gc/orchestrate.c:447
#5 0x7f84433e1ead in MVM_gc_enter_from_allocator src/gc/orchestrate.c:598
#6 0x7f84433e27d0 in MVM_gc_allocate_nursery src/gc/allocation.c:37
#7 0x7f84433e33a7 in MVM_gc_allocate src/gc/allocation.h:15
#8 0x7f84433e33a7 in MVM_gc_allocate_zeroed src/gc/allocation.h:21
#9 0x7f84433e33a7 in MVM_gc_allocate_object src/gc/allocation.c:86
#10 0x7f84433626be in MVM_frame_takeclosure src/core/frame.c:1144
#11 0x7f8443310999 in MVM_interp_run src/core/interp.c:1153
#12 0x7f844337db75 in start_thread src/core/threads.c:101
#13 0x7f84429b4258 in start_thread (/usr/lib/../lib/libpthread.so.0+0x9258)
previously allocated by thread T7 here:
#0 0x7f84445ff652 in __interceptor_realloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:164
#1 0x7f84435ea1d9 in MVM_realloc src/core/alloc.h:31
#2 0x7f84435ea1d9 in MVM_string_utf8_encode_C_string src/strings/utf8.c:626
#3 0x7f84434d79a1 in MVM_6model_set_debug_name src/6model/6model.c:84
#4 0x7f844331db1d in MVM_interp_run src/core/interp.c:4704
#5 0x7f844337db75 in start_thread src/core/threads.c:101
#6 0x7f84429b4258 in start_thread (/usr/lib/../lib/libpthread.so.0+0x9258)
Thread T6 created by T3 here:
#0 0x7f84445a0fa7 in __interceptor_pthread_create /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:216
#1 0x7f844376b60d in uv_thread_create_ex 3rdparty/libuv/src/unix/thread.c:259
Thread T3 created by T0 here:
#0 0x7f84445a0fa7 in __interceptor_pthread_create /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:216
#1 0x7f844376b60d in uv_thread_create_ex 3rdparty/libuv/src/unix/thread.c:259
Thread T7 created by T3 here:
#0 0x7f84445a0fa7 in __interceptor_pthread_create /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:216
#1 0x7f844376b60d in uv_thread_create_ex 3rdparty/libuv/src/unix/thread.c:259
SUMMARY: AddressSanitizer: double-free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127 in __interceptor_free
==1003401==ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment