diff --git a/master_changes.md b/master_changes.md index 2cfe0f6b18b..ead50ef7fd5 100644 --- a/master_changes.md +++ b/master_changes.md @@ -105,7 +105,7 @@ users) ## Internal ## Internal: Windows - * Fix sporadic crash in shell detection (seen in native containers) [#5714 @dra27] + * Fix sporadic crash and segfault in shell detection (seen in native containers) [#5714 @dra27] ## Test diff --git a/src/stubs/win32/opamWindows.c b/src/stubs/win32/opamWindows.c index 837c57c467d..dba15ce3689 100644 --- a/src/stubs/win32/opamWindows.c +++ b/src/stubs/win32/opamWindows.c @@ -675,6 +675,7 @@ CAMLprim value OPAMW_GetProcessAncestry(value unit) read_entry = FALSE; break; } else { + cur = ptr + (cur - processes); processes = ptr; } }