Project

General

Profile

Bug #14047

SEGV happen when running script under OneDrive directory if File On-Demand is enabled

Added by what_alnk (わたる なかい) about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
[ruby-core:83539]

Description

After Windows 10 Fall Creators Update, SEGV happened when I run any script under OneDrive directory.
If File On-Demand was disabled, SEGV did not happened.

I attached the log.

OS: Windows 10 Pro Version 1709 Build 16299.19


Files

2017-10-23-ruby-segv.txt (6.35 KB) 2017-10-23-ruby-segv.txt what_alnk (わたる なかい), 10/24/2017 09:22 AM

Related issues

Related to Ruby master - Bug #14139: [BUG] Segmentation faultRejectedActions
Has duplicate Ruby master - Bug #14135: OneDrive folder on windows doesnt behaveClosedActions
Has duplicate Ruby master - Bug #14379: Exit code 3 when running the sass compilerClosedActions

Updated by nobu (Nobuyoshi Nakada) about 3 years ago

Could you try this patch?

diff --git a/win32/win32.c b/win32/win32.c
index 62801dae71..7e8afb2ddc 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4958,7 +4958,7 @@ rb_w32_read_reparse_point(const WCHAR *path, rb_w32_reparse_buffer_t *rp,
        ret = rp->SymbolicLinkReparseBuffer.PrintNameLength;
        *len = ret / sizeof(WCHAR);
    }
-   else { /* IO_REPARSE_TAG_MOUNT_POINT */
+   else if (rp->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) {
        static const WCHAR *volume = L"Volume{";
        enum {volume_prefix_len = rb_strlen_lit("\\??\\")};
        name = ((char *)rp->MountPointReparseBuffer.PathBuffer +
@@ -4971,6 +4971,9 @@ rb_w32_read_reparse_point(const WCHAR *path, rb_w32_reparse_buffer_t *rp,
        memcmp(name, volume, sizeof(volume) - 1 * sizeof(WCHAR)) == 0)
        return -1;
    }
+   else {
+       return -1;
+   }
    *result = name;
    if (e) {
        if ((char *)name + ret + sizeof(WCHAR) > (char *)rp + bufsize)
#3

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r60421.


win32.c: unknown reparse tags

  • win32/win32.c (rb_w32_read_reparse_point): skip unknown reparse tags. [ruby-core:83539] [Bug #14047]
#4

Updated by usa (Usaku NAKAMURA) almost 3 years ago

  • Has duplicate Bug #14135: OneDrive folder on windows doesnt behave added
#5

Updated by usa (Usaku NAKAMURA) almost 3 years ago

  • Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN to 2.3: REQUIRED, 2.4: REQUIRED
#6

Updated by hsbt (Hiroshi SHIBATA) almost 3 years ago

  • Related to Bug #14139: [BUG] Segmentation fault added
#7

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Has duplicate Bug #14379: Exit code 3 when running the sass compiler added

Updated by nagachika (Tomoyuki Chikanaga) over 2 years ago

  • Backport changed from 2.3: REQUIRED, 2.4: REQUIRED to 2.3: REQUIRED, 2.4: DONE

ruby_2_4 r62804 merged revision(s) 60421.

Updated by usa (Usaku NAKAMURA) over 2 years ago

  • Backport changed from 2.3: REQUIRED, 2.4: DONE to 2.3: DONE, 2.4: DONE

ruby_2_3 r62828 merged revision(s) 60421.

Also available in: Atom PDF