Skip to content

Conversation

@MacroModel
Copy link
Collaborator

No description provided.

@MacroModel
Copy link
Collaborator Author

等我加一个wasi-thread功能

@MacroModel
Copy link
Collaborator Author

asan炸了

[ 73%]: path_rename_wasm64/unit ...................................... failed 0.187s
stderr: =================================================================
==1716==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x1183734a0938 at pc 0x7ffc630ea0fb bp 0x004a557fbae0 sp 0x004a557fbb28
READ of size 42 at 0x1183734a0938 thread T0
    #0 0x7ffc630ea0fa in __asan_memcpy (D:\a\_temp\msys64\clang64\bin\libclang_rt.asan_dynamic-x86_64.dll+0x18004a0fa)
    #1 0x7ff620f5abab in fast_io::freestanding::my_memcpy(void*, void const*, unsigned long long) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_core_impl/freestanding/algorithm.h:258:3
    #2 0x7ff620fae3c9 in void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)::operator()(void*, fast_io::win32::nt::unicode_string const*) const D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:712:4
    #3 0x7ff620faec54 in auto fast_io::win32::nt::details::nt_call_invoke_with_directory_handle_impl<char16_t, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)>(void*, char16_t const*, unsigned long long, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/platforms/nt/nt_path.h:122:10
    #4 0x7ff620fadee9 in auto fast_io::win32::nt::details::nt_call_callback<char16_t, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)>(void*, char16_t const*, unsigned long long, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/platforms/nt/nt_path.h:200:9
    #5 0x7ff620fadd75 in auto fast_io::win32::nt::details::nt_call_determine_kernel_callback<char16_t, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)>(void*, char16_t const*, unsigned long long, bool, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/platforms/nt/nt_path.h:259:10
    #6 0x7ff620fadb63 in void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:695:2
    #7 0x7ff620fad8c1 in auto fast_io::win32::nt::details::nt22_api_dispatcher<false, (fast_io::details::posix_api_22)0, bool>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:883:3
    #8 0x7ff620fad842 in auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:974:23
    #9 0x7ff620fad3cb in auto fast_io::details::nt_api_common_code_cvt_impl<fast_io::generic_allocator_adapter<fast_io::nt_rtlallocateheap_allocator>, char8_t, auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const::'lambda'(char16_t const*, unsigned long long)>(T0 const*, unsigned long long, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/api_encoding_converter/win32.h:16:10
    #10 0x7ff620fad20d in auto fast_io::nt_api_common<fast_io::generic_allocator_adapter<fast_io::nt_rtlallocateheap_allocator>, fast_io::containers::basic_cstring_view<char8_t>, auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const::'lambda'(char16_t const*, unsigned long long)>(T0 const&, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/api_encoding_converter/win32.h:86:11
    #11 0x7ff620fad026 in auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:972:16
    #12 0x7ff620facc5b in auto fast_io::details::nt_api_common_code_cvt_impl<fast_io::generic_allocator_adapter<fast_io::nt_rtlallocateheap_allocator>, char8_t, auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)>(T0 const*, unsigned long long, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/api_encoding_converter/win32.h:16:10
    #13 0x7ff620facaa3 in auto fast_io::nt_api_common<fast_io::generic_allocator_adapter<fast_io::nt_rtlallocateheap_allocator>, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)>(T0 const&, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/api_encoding_converter/win32.h:86:11
    #14 0x7ff620fac8c6 in auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:970:9
    #15 0x7ff620f6a92a in void fast_io::native_renameat<fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, fast_io::containers::basic_cstring_view<char8_t>&>(fast_io::nt_at_entry, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, fast_io::nt_at_entry, fast_io::containers::basic_cstring_view<char8_t>&) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:1405:2
    #16 0x7ff620f49f51 in uwvm2::imported::wasi::wasip1::func::path_rename_wasm64(uwvm2::imported::wasi::wasip1::environment::wasip1_environment<uwvm2::object::memory::linear::mmap_memory_t>&, int, unsigned long long, unsigned long long, int, unsigned long long, unsigned long long) D:/a/uwvm2/uwvm2/src/uwvm2/imported/wasi/wasip1/func/path_rename_wasm64.h:805:37
    #17 0x7ff620f4279a in main D:/a/uwvm2/uwvm2/test\0008.imported\wasi\wasip1\func/path_rename_wasm64.cc:206:26
    #18 0x7ff620f410fd in __tmainCRTStartup D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
    #19 0x7ff620f413b5 in .l_start D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:122:9
    #20 0x7ffc8c80e8d6  (C:\Windows\System32\KERNEL32.DLL+0x18002e8d6)
    #21 0x7ffc8dc8c53b  (C:\Windows\SYSTEM32\ntdll.dll+0x18008c53b)
0x1183734a0938 is located 0 bytes after 40-byte region [0x1183734a0910,0x1183734a0938)
allocated by thread T0 here:
    #0 0x7ffc630eb7c1 in malloc (D:\a\_temp\msys64\clang64\bin\libclang_rt.asan_dynamic-x86_64.dll+0x18004b7c1)
    #1 0x7ff620f4c7a3 in fast_io::c_malloc_allocator::allocate(unsigned long long) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_core_impl/allocation/c_malloc.h:43:4
    #2 0x7ff620f4c772 in fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>::allocate(unsigned long long) requires !fast_io::generic_allocator_adapter::has_status D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_core_impl/allocation/adapters.h:123:12
    #3 0x7ff620fa88d2 in fast_io::generic_allocator_adapter<fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>::allocate(unsigned long long) requires !fast_io::generic_allocator_adapter::has_status D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_core_impl/allocation/adapters.h:123:12
    #4 0x7ff620fa87cc in fast_io::typed_generic_allocator_adapter<fast_io::generic_allocator_adapter<fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, char16_t>::allocate(unsigned long long) requires !fast_io::typed_generic_allocator_adapter::has_status D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_core_impl/allocation/adapters.h:1164:28
    #5 0x7ff620faeaef in auto fast_io::win32::nt::details::nt_call_invoke_with_directory_handle_impl<char16_t, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)>(void*, char16_t const*, unsigned long long, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/platforms/nt/nt_path.h:108:29
    #6 0x7ff620fadee9 in auto fast_io::win32::nt::details::nt_call_callback<char16_t, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)>(void*, char16_t const*, unsigned long long, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/platforms/nt/nt_path.h:200:9
    #7 0x7ff620fadd75 in auto fast_io::win32::nt::details::nt_call_determine_kernel_callback<char16_t, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)>(void*, char16_t const*, unsigned long long, bool, void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool)::'lambda'(void*, fast_io::win32::nt::unicode_string const*)) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/platforms/nt/nt_path.h:259:10
    #8 0x7ff620fadb63 in void fast_io::win32::nt::details::nt_renameat_impl<false>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:695:2
    #9 0x7ff620fad8c1 in auto fast_io::win32::nt::details::nt22_api_dispatcher<false, (fast_io::details::posix_api_22)0, bool>(void*, char16_t const*, unsigned long long, void*, char16_t const*, unsigned long long, bool) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:883:3
    #10 0x7ff620fad842 in auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:974:23
    #11 0x7ff620fad3cb in auto fast_io::details::nt_api_common_code_cvt_impl<fast_io::generic_allocator_adapter<fast_io::nt_rtlallocateheap_allocator>, char8_t, auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const::'lambda'(char16_t const*, unsigned long long)>(T0 const*, unsigned long long, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/api_encoding_converter/win32.h:16:10
    #12 0x7ff620fad20d in auto fast_io::nt_api_common<fast_io::generic_allocator_adapter<fast_io::nt_rtlallocateheap_allocator>, fast_io::containers::basic_cstring_view<char8_t>, auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const::'lambda'(char16_t const*, unsigned long long)>(T0 const&, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/api_encoding_converter/win32.h:86:11
    #13 0x7ff620fad026 in auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)::operator()(char16_t const*, unsigned long long) const D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:972:16
    #14 0x7ff620facc5b in auto fast_io::details::nt_api_common_code_cvt_impl<fast_io::generic_allocator_adapter<fast_io::nt_rtlallocateheap_allocator>, char8_t, auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)>(T0 const*, unsigned long long, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/api_encoding_converter/win32.h:16:10
    #15 0x7ff620facaa3 in auto fast_io::nt_api_common<fast_io::generic_allocator_adapter<fast_io::nt_rtlallocateheap_allocator>, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool)::'lambda'(char16_t const*, unsigned long long)>(T0 const&, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/api_encoding_converter/win32.h:86:11
    #16 0x7ff620fac8c6 in auto fast_io::win32::nt::details::nt_deal_with22<(fast_io::nt_family)18, (fast_io::details::posix_api_22)0, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>>, fast_io::containers::basic_cstring_view<char8_t>, bool>(void*, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, void*, fast_io::containers::basic_cstring_view<char8_t> const&, bool) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:970:9
    #17 0x7ff620f6a92a in void fast_io::native_renameat<fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, fast_io::containers::basic_cstring_view<char8_t>&>(fast_io::nt_at_entry, fast_io::containers::basic_string<char8_t, fast_io::generic_allocator_adapter<fast_io::c_malloc_allocator>> const&, fast_io::nt_at_entry, fast_io::containers::basic_cstring_view<char8_t>&) D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_hosted/filesystem/nt_at.h:1405:2
    #18 0x7ff620f49f51 in uwvm2::imported::wasi::wasip1::func::path_rename_wasm64(uwvm2::imported::wasi::wasip1::environment::wasip1_environment<uwvm2::object::memory::linear::mmap_memory_t>&, int, unsigned long long, unsigned long long, int, unsigned long long, unsigned long long) D:/a/uwvm2/uwvm2/src/uwvm2/imported/wasi/wasip1/func/path_rename_wasm64.h:805:37
    #19 0x7ff620f4279a in main D:/a/uwvm2/uwvm2/test\0008.imported\wasi\wasip1\func/path_rename_wasm64.cc:206:26
    #20 0x7ff620f410fd in __tmainCRTStartup D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:236:11
    #21 0x7ff620f413b5 in .l_start D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:122:9
    #22 0x7ffc8c80e8d6  (C:\Windows\System32\KERNEL32.DLL+0x18002e8d6)
    #23 0x7ffc8dc8c53b  (C:\Windows\SYSTEM32\ntdll.dll+0x18008c53b)
SUMMARY: AddressSanitizer: heap-buffer-overflow D:/a/uwvm2/uwvm2/third-parties\fast_io\include/fast_io_core_impl/freestanding/algorithm.h:258:3 in fast_io::freestanding::my_memcpy(void*, void const*, unsigned long long)
Shadow bytes around the buggy address:
  0x1183734a0680: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 fa
  0x1183734a0700: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 fa
  0x1183734a0780: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 fa
  0x1183734a0800: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 fa
  0x1183734a0880: fa fa 00 00 00 00 00 fa fa fa fd fd fd fd fd fa
=>0x1183734a0900: fa fa 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa
  0x1183734a0980: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1183734a0a00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1183734a0a80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1183734a0b00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1183734a0b80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
==1716==ABORTING

@MacroModel
Copy link
Collaborator Author

fixed

@MacroModel
Copy link
Collaborator Author

@trcrsired merge plz

@MacroModel
Copy link
Collaborator Author

passed UlteSoft/uwvm2#135

@trcrsired trcrsired merged commit 4b814dd into cppfastio:next Nov 29, 2025
2 checks passed
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.

2 participants