summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-05-29 17:52:47 +0300
committerEli Zaretskii <eliz@gnu.org>2014-05-29 17:52:47 +0300
commit0bbb27fc3f52f87605cfadba62d52b72523b73a5 (patch)
treefacc4efc43f9ab259ab7f26c0bdb44afe52f9c0c /src/emacs.c
parent609b06a0a1649b9bbcc6ffe0ac96a4192f855603 (diff)
downloademacs-0bbb27fc3f52f87605cfadba62d52b72523b73a5.tar.gz
Fix bug #17622 with crashes in mmap routines.
src/buffer.c (init_buffer): Accept an argument 'initialized'. [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset mmap_regions and mmap_fd, to avoid referencing stale data from the dump phase. Add an assertion for buffer text of buffers created in temacs before this function is called. (mmap_regions_1, mmap_fd_1): Remove unused variables. src/lisp.h (init_buffer): Update prototype. src/emacs.c (main): Pass 'initialized' as the argument to init_buffer.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emacs.c b/src/emacs.c
index fabea11a3bf..57f713125ee 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1376,7 +1376,8 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
xputenv ("LANG=C");
#endif
- init_buffer (); /* Init default directory of main buffer. */
+ /* Init buffer storage and default directory of main buffer. */
+ init_buffer (initialized);
init_callproc_1 (); /* Must precede init_cmdargs and init_sys_modes. */