Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f58269c4
Commit
f58269c4
authored
Mar 21, 2014
by
Daniel Colascione
Browse files
Do not allow a dumped Emacs to be dumped
parents
aa3a7b51
6ce1b56e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
7 deletions
+20
-7
src/ChangeLog
src/ChangeLog
+9
-0
src/emacs.c
src/emacs.c
+10
-0
src/lisp.h
src/lisp.h
+1
-0
src/unexcw.c
src/unexcw.c
+0
-7
No files found.
src/ChangeLog
View file @
f58269c4
2014-03-21 Daniel Colascione <dancol@dancol.org>
Always prohibit dumping a dumped Emacs.
* emacs.c (might_dump): New variable.
(Fdump_emacs): Always prohibit dumping of dumped Emacs.
* lisp.h (might_dump): Declare.
* unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
* doc.c (store_function_docstring): Fix pointer signedness mismatch.
...
...
src/emacs.c
View file @
f58269c4
...
...
@@ -121,6 +121,9 @@ Lisp_Object Vlibrary_cache;
on subsequent starts. */
bool
initialized
;
/* Set to true if this instance of Emacs might dump. */
bool
might_dump
;
#ifdef DARWIN_OS
extern
void
unexec_init_emacs_zone
(
void
);
#endif
...
...
@@ -1631,6 +1634,10 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
#endif
#endif
#ifndef CANNOT_DUMP
might_dump
=
!
initialized
;
#endif
initialized
=
1
;
#ifdef LOCALTIME_CACHE
...
...
@@ -2082,6 +2089,9 @@ You must run Emacs in batch mode in order to dump it. */)
if
(
!
noninteractive
)
error
(
"Dumping Emacs works only in batch mode"
);
if
(
!
might_dump
)
error
(
"Emacs can be dumped only once"
);
#ifdef GNU_LINUX
/* Warn if the gap between BSS end and heap start is larger than this. */
...
...
src/lisp.h
View file @
f58269c4
...
...
@@ -800,6 +800,7 @@ extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
/* Defined in emacs.c. */
extern
bool
initialized
;
extern
bool
might_dump
;
/* Defined in eval.c. */
extern
Lisp_Object
Qautoload
;
...
...
src/unexcw.c
View file @
f58269c4
...
...
@@ -286,13 +286,6 @@ unexec (const char *outfile, const char *infile)
int
ret
;
int
ret2
;
if
(
bss_sbrk_did_unexec
)
{
/* can only dump once */
printf
(
"You can only dump Emacs once on this platform.
\n
"
);
return
;
}
report_sheap_usage
(
1
);
infile
=
add_exe_suffix_if_necessary
(
infile
,
infile_buffer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment