diff options
| author | Eli Zaretskii | 2016-12-17 13:08:52 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-12-17 13:08:52 +0200 |
| commit | 0757b4f2f73daa67e5c5217964b423c6a0239e95 (patch) | |
| tree | abf4bc0accf7a0f0202e9ad88401d2d2ee4796ea /lib/stdio-impl.h | |
| parent | 6bf83218314db1c63ce34564edfb994d9431b28a (diff) | |
| download | emacs-0757b4f2f73daa67e5c5217964b423c6a0239e95.tar.gz emacs-0757b4f2f73daa67e5c5217964b423c6a0239e95.zip | |
Fix crashes on MS-Windows during dumping
* src/unexw32.c (get_section_info): Make extra_bss_size be the
maximum of extra_bss_size and extra_bss_size_static. This avoids
computing the size of the output file smaller than it actually
needs to be, which then causes copy_executable_and_dump_data to
write beyond the requested size of the file mapping, thus relying
on the OS roundup to page boundary to save us from ourselves. See
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00642.html
for the details.
* lib/stdio-impl.h: Revert the workaround fix of not including
errno.h for MinGW.
Diffstat (limited to 'lib/stdio-impl.h')
| -rw-r--r-- | lib/stdio-impl.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 1972a33ab13..766d6936590 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h | |||
| @@ -26,9 +26,7 @@ | |||
| 26 | # include <sys/param.h> | 26 | # include <sys/param.h> |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | #ifndef __MINGW32__ | ||
| 30 | #include <errno.h> /* For detecting Plan9. */ | 29 | #include <errno.h> /* For detecting Plan9. */ |
| 31 | #endif | ||
| 32 | 30 | ||
| 33 | #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ | 31 | #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ |
| 34 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ | 32 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ |