Skip to content

Conversation

@wanabe
Copy link
Owner

@wanabe wanabe commented May 4, 2022

No description provided.

@wanabe wanabe force-pushed the yjit-rust-arm64 branch from cf3a5c5 to e789684 Compare May 4, 2022 09:10
@wanabe wanabe force-pushed the yjit-rust-arm64 branch from e789684 to 3210402 Compare May 5, 2022 01:56
@wanabe wanabe changed the title First step of yjit on aarc64 First step of yjit on aarch64 May 5, 2022
@wanabe wanabe force-pushed the yjit-rust-arm64 branch from 3210402 to c7c5c46 Compare May 5, 2022 04:46
@wanabe wanabe force-pushed the yjit-rust-arm64 branch from c7c5c46 to 910c72c Compare May 5, 2022 06:01
wanabe pushed a commit that referenced this pull request Jan 26, 2025
When searching for native extensions, if the name does not end in ".so"
then we create a new string and append ".so" so it. If the native extension
is in static_ext_inits, then we could trigger a GC in the rb_filesystem_str_new_cstr.
This could cuase the GC to free lookup_name since we don't use the local
variable anymore.

This bug was caught in this ASAN build:
http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5479182

    ==435614==ERROR: AddressSanitizer: use-after-poison on address 0x715a63022da0 at pc 0x5e7463873e4e bp 0x7fff383c8b00 sp 0x7fff383c82c0
    READ of size 14 at 0x715a63022da0 thread T0
        #0 0x5e7463873e4d in __asan_memcpy (/tmp/ruby/build/trunk_asan/ruby+0x214e4d) (BuildId: 607411c0626a2f66b4c20c02179b346aace20898)
        #1 0x5e7463b50a82 in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10
        #2 0x5e7463b50a82 in ruby_nonempty_memcpy /tmp/ruby/src/trunk_asan/include/ruby/internal/memory.h:671:16
        #3 0x5e7463b50a82 in str_enc_new /tmp/ruby/src/trunk_asan/string.c:1035:9
        #4 0x5e74639b97dd in search_required /tmp/ruby/src/trunk_asan/load.c:1126:21
        #5 0x5e74639b97dd in require_internal /tmp/ruby/src/trunk_asan/load.c:1274:17
        #6 0x5e74639b83c1 in rb_require_string_internal /tmp/ruby/src/trunk_asan/load.c:1401:22
        #7 0x5e74639b83c1 in rb_require_string /tmp/ruby/src/trunk_asan/load.c:1387:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants