diff options
| author | Paul Eggert | 2016-10-23 02:43:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-10-23 02:43:17 -0700 |
| commit | 6129cd03e20a0aaee46ceb742a9ed1ae2904eab3 (patch) | |
| tree | f432bbffba80979cec74cfc125a9f73abfd06a91 /src/lread.c | |
| parent | 16d126d7559c2f58c8af6cf86c9f54b6e21cceb4 (diff) | |
| parent | b73f4668ab685dfb690eced15b20ed47f90efccb (diff) | |
| download | emacs-6129cd03e20a0aaee46ceb742a9ed1ae2904eab3.tar.gz emacs-6129cd03e20a0aaee46ceb742a9ed1ae2904eab3.zip | |
Merge from origin/emacs-25
b73f466 * lisp/cus-start.el (exec-path): Handle nil elements. (Bug#2...
55ebb70 Catch the imenu-unavailable error in sh-mode completion table
993acb5 ; Minor fix for last change in characters.el
30c4bb5 More char-width fixes
4eb4463 Fix char-width-table values for some Emoji
528997d Keep point when switching from and to *terminal* buffer
2130005 * INSTALL: Use correct Emacs release number 25.
10835b1 Avoid crashes due to objects read with the #n=object form
4de671d Improve doc string of 'completion-at-point-functions'
ceb46f0 Fix crash in evaluating functions
d8374c4 * src/filelock.c (current_lock_owner): Update comment.
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c index 10eec3b1be0..58d518ce40b 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2917,7 +2917,18 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 2917 | if (c == '=') | 2917 | if (c == '=') |
| 2918 | { | 2918 | { |
| 2919 | /* Make a placeholder for #n# to use temporarily. */ | 2919 | /* Make a placeholder for #n# to use temporarily. */ |
| 2920 | AUTO_CONS (placeholder, Qnil, Qnil); | 2920 | /* Note: We used to use AUTO_CONS to allocate |
| 2921 | placeholder, but that is a bad idea, since it | ||
| 2922 | will place a stack-allocated cons cell into | ||
| 2923 | the list in read_objects, which is a | ||
| 2924 | staticpro'd global variable, and thus each of | ||
| 2925 | its elements is marked during each GC. A | ||
| 2926 | stack-allocated object will become garbled | ||
| 2927 | when its stack slot goes out of scope, and | ||
| 2928 | some other function reuses it for entirely | ||
| 2929 | different purposes, which will cause crashes | ||
| 2930 | in GC. */ | ||
| 2931 | Lisp_Object placeholder = Fcons (Qnil, Qnil); | ||
| 2921 | Lisp_Object cell = Fcons (make_number (n), placeholder); | 2932 | Lisp_Object cell = Fcons (make_number (n), placeholder); |
| 2922 | read_objects = Fcons (cell, read_objects); | 2933 | read_objects = Fcons (cell, read_objects); |
| 2923 | 2934 | ||