summaryrefslogtreecommitdiff
path: root/src/fns.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-08-15 10:48:36 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-08-15 11:19:51 -0700
commitd0145537fa511a44e2a4af01da3947e92f0b8331 (patch)
tree0b098e725155c3b40031e0ecb8c65bbb25a6e402 /src/fns.c
parent4cba236749aafade7bd88cf2a10be48f44983faa (diff)
downloademacs-d0145537fa511a44e2a4af01da3947e92f0b8331.tar.gz
Fix GC bugs related to uninitialized vectors
Avoid problems if GC occurs while initializing a vector. Problem with Fdelete reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2020-08/msg00313.html I looked for similar problems elsewhere and found quite a few. * src/coding.c (make_subsidiaries): * src/composite.c (syms_of_composite): * src/font.c (build_style_table, Ffont_get_glyphs): * src/nsselect.m (clean_local_selection_data): * src/nsxwidget.m (js_to_lisp): * src/syntax.c (init_syntax_once): * src/window.c (Fcurrent_window_configuration): * src/xselect.c (selection_data_to_lisp_data) (clean_local_selection_data): Use make_nil_vector instead of make_uninit_vector. * src/fns.c (Fdelete): * src/xwidget.c (webkit_js_to_lisp): Use allocate_nil_vector instead of allocate_vector. * src/search.c (Fnewline_cache_check): Use make_vector instead of make_uninit_vector.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fns.c b/src/fns.c
index 91991782124..ded6f344aad 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1755,7 +1755,7 @@ changing the value of a sequence `foo'. */)
if (n != ASIZE (seq))
{
- struct Lisp_Vector *p = allocate_vector (n);
+ struct Lisp_Vector *p = allocate_nil_vector (n);
for (i = n = 0; i < ASIZE (seq); ++i)
if (NILP (Fequal (AREF (seq, i), elt)))