msys2-runtime icon indicating copy to clipboard operation
msys2-runtime copied to clipboard

Fix crash on WinPE

Open lesderid opened this issue 2 years ago • 7 comments

Native RAM disks, e.g. as are used in WinPE environments, have other characteristics than regular filesystems such as NTFS. For instance, re-opening files with NtOpenFile is buggy. This can cause a bugcheck with the current implementation of mmap.

The first commit adds RAM disk detection. The second commit uses init_reopen_attr in mmap to circumvent the re-opening bug.

Fixes #160

lesderid avatar Jul 13 '23 23:07 lesderid

~This should probably be submitted upstream to Cygwin, but I don't have time for this right now.~

I've submitted this upstream.

lesderid avatar Jul 13 '23 23:07 lesderid

~This should probably be submitted upstream to Cygwin, but I don't have time for this right now.~

I've submitted this upstream.

For lurkers, the submission can be seen here: https://inbox.sourceware.org/cygwin-patches/[email protected]/

dscho avatar Aug 14 '23 09:08 dscho

It might be a while before I can address the review comments, but the patch does work as-is.

lesderid avatar Aug 14 '23 19:08 lesderid