[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116823: Do not allow a dumped Emacs to be dumped
From: |
Daniel Colascione |
Subject: |
[Emacs-diffs] trunk r116823: Do not allow a dumped Emacs to be dumped |
Date: |
Fri, 21 Mar 2014 08:32:48 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116823 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Daniel Colascione <address@hidden>
branch nick: trunk
timestamp: Fri 2014-03-21 00:27:26 -0700
message:
Do not allow a dumped Emacs to be dumped
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/emacs.c emacs.c-20091113204419-o5vbwnq5f7feedwu-241
src/lisp.h lisp.h-20091113204419-o5vbwnq5f7feedwu-253
src/unexcw.c unexcw.c-20091113204419-o5vbwnq5f7feedwu-3010
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-03-20 17:42:05 +0000
+++ b/src/ChangeLog 2014-03-21 07:26:47 +0000
@@ -1,3 +1,12 @@
+2014-03-21 Daniel Colascione <address@hidden>
+
+ 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 <address@hidden>
* doc.c (store_function_docstring): Fix pointer signedness mismatch.
=== modified file 'src/emacs.c'
--- a/src/emacs.c 2014-02-17 21:20:44 +0000
+++ b/src/emacs.c 2014-03-21 07:26:47 +0000
@@ -121,6 +121,9 @@
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 @@
#endif
#endif
+#ifndef CANNOT_DUMP
+ might_dump = !initialized;
+#endif
+
initialized = 1;
#ifdef LOCALTIME_CACHE
@@ -2082,6 +2089,9 @@
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. */
=== modified file 'src/lisp.h'
--- a/src/lisp.h 2014-02-28 21:45:34 +0000
+++ b/src/lisp.h 2014-03-21 07:26:47 +0000
@@ -800,6 +800,7 @@
/* Defined in emacs.c. */
extern bool initialized;
+extern bool might_dump;
/* Defined in eval.c. */
extern Lisp_Object Qautoload;
=== modified file 'src/unexcw.c'
--- a/src/unexcw.c 2014-01-01 07:43:34 +0000
+++ b/src/unexcw.c 2014-03-21 07:26:47 +0000
@@ -286,13 +286,6 @@
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116823: Do not allow a dumped Emacs to be dumped,
Daniel Colascione <=