Actions
Bug #14047
closedSEGV happen when running script under OneDrive directory if File On-Demand is enabled
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
Backport:
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
Updated by nobu (Nobuyoshi Nakada) about 7 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 (わたる なかい) about 7 years ago
It works.
Thank you.
Updated by nobu (Nobuyoshi Nakada) about 7 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]
Updated by usa (Usaku NAKAMURA) about 7 years ago
- Has duplicate Bug #14135: OneDrive folder on windows doesnt behave added
Updated by usa (Usaku NAKAMURA) about 7 years ago
- Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN to 2.3: REQUIRED, 2.4: REQUIRED
Updated by hsbt (Hiroshi SHIBATA) about 7 years ago
- Related to Bug #14139: [BUG] Segmentation fault added
Updated by nobu (Nobuyoshi Nakada) almost 7 years ago
- Has duplicate Bug #14379: Exit code 3 when running the sass compiler added
Updated by nagachika (Tomoyuki Chikanaga) almost 7 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) almost 7 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
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0