GNU bug report logs -
#50453
27.2; Portable dumper broken on MSW
Previous Next
Reported by: Po Lu <luangruo <at> yahoo.com>
Date: Tue, 7 Sep 2021 12:47:02 UTC
Severity: normal
Tags: moreinfo
Found in version 27.2
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: 50453 <at> debbugs.gnu.org
> Date: Fri, 10 Sep 2021 08:48:47 +0800
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > How did you try that? Did you rebuild Emacs? If so, I would like you
> > to try a different change first, before we decide to give up on the
> > memory-mapped file approach.
>
> Yes, I rebuilt Emacs. I would be glad to test another change, thanks!
Please try the patch below.
diff --git a/src/pdumper.c b/src/pdumper.c
index 7730ea3..2291fce 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4537,15 +4537,28 @@ dump_map_file_w32 (void *base, int fd, off_t offset, size_t size,
uint32_t offset_low = (uint32_t) (full_offset & 0xffffffff);
int error;
+ DWORD protect;
DWORD map_access;
file = (HANDLE) _get_osfhandle (fd);
if (file == INVALID_HANDLE_VALUE)
goto out;
+ switch (protection)
+ {
+ case DUMP_MEMORY_ACCESS_READWRITE:
+ protect = PAGE_WRITECOPY; /* for Windows 9X */
+ break;
+ default:
+ case DUMP_MEMORY_ACCESS_NONE:
+ case DUMP_MEMORY_ACCESS_READ:
+ protect = PAGE_READONLY;
+ break;
+ }
+
section = CreateFileMapping (file,
/*lpAttributes=*/NULL,
- PAGE_READONLY,
+ protect,
/*dwMaximumSizeHigh=*/0,
/*dwMaximumSizeLow=*/0,
/*lpName=*/NULL);
This bug report was last modified 2 years and 331 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.