aboutsummaryrefslogtreecommitdiffstats
path: root/src/pdumper.c
diff options
context:
space:
mode:
authorEli Zaretskii2019-03-27 20:34:22 +0200
committerEli Zaretskii2019-03-27 20:34:22 +0200
commita35a1f6a9406bc98b4ab83489e5dc7843ffacfb6 (patch)
treec6167df9e04a63952c0ef7bf1d4b0a292887c5d4 /src/pdumper.c
parenta697d1e638eabdb3eb32337fde6d802ef712eaf8 (diff)
downloademacs-a35a1f6a9406bc98b4ab83489e5dc7843ffacfb6.tar.gz
emacs-a35a1f6a9406bc98b4ab83489e5dc7843ffacfb6.zip
Attempt to fix crashes under GDB on Windows 10
* src/pdumper.c (dump_discard_mem) [VM_SUPPORTED == VM_MS_WINDOWS]: Don't pass NULL pointer as last argument to VirtualProtect. Reported by Martin Rudalics <rudalics@gmx.at>.
Diffstat (limited to 'src/pdumper.c')
-rw-r--r--src/pdumper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index f459d971c35..8116c75ae8e 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4623,7 +4623,8 @@ dump_discard_mem (void *mem, size_t size)
4623 /* Discard COWed pages. */ 4623 /* Discard COWed pages. */
4624 (void) VirtualFree (mem, size, MEM_DECOMMIT); 4624 (void) VirtualFree (mem, size, MEM_DECOMMIT);
4625 /* Release the commit charge for the mapping. */ 4625 /* Release the commit charge for the mapping. */
4626 (void) VirtualProtect (mem, size, PAGE_NOACCESS, NULL); 4626 DWORD old_prot;
4627 (void) VirtualProtect (mem, size, PAGE_NOACCESS, &old_prot);
4627#elif VM_SUPPORTED == VM_POSIX 4628#elif VM_SUPPORTED == VM_POSIX
4628# ifdef HAVE_POSIX_MADVISE 4629# ifdef HAVE_POSIX_MADVISE
4629 /* Discard COWed pages. */ 4630 /* Discard COWed pages. */