Project

General

Profile

Actions

Bug #14047

closed

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

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

Status:
Closed
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 3 (0 open3 closed)

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) over 6 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)

Updated by what_alnk (わたる なかい) over 6 years ago

It works.
Thank you.

Actions #3

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r60421.


win32.c: unknown reparse tags

Actions #4

Updated by usa (Usaku NAKAMURA) over 6 years ago

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

Updated by usa (Usaku NAKAMURA) over 6 years ago

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

Updated by hsbt (Hiroshi SHIBATA) over 6 years ago

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

Updated by nobu (Nobuyoshi Nakada) about 6 years ago

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

Updated by nagachika (Tomoyuki Chikanaga) about 6 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) about 6 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0