From: Gerd Möllmann Date: Mon, 19 Dec 2022 13:25:27 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/master' into scratch/pkg X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=54ec3973e298c3d2b3d81484f80053d881694f88;p=emacs.git Merge remote-tracking branch 'origin/master' into scratch/pkg --- 54ec3973e298c3d2b3d81484f80053d881694f88 diff --cc src/alloc.c index 91a3237c57f,2975754124a..a9eff612de8 --- a/src/alloc.c +++ b/src/alloc.c @@@ -3705,8 -3865,9 +3909,9 @@@ Its value is void, and its function def if (symbol_free_list) { + ASAN_UNPOISON_SYMBOL (symbol_free_list); XSETSYMBOL (val, symbol_free_list); - symbol_free_list = symbol_free_list->u.s.next; + symbol_free_list = next_free_symbol (symbol_free_list); } else { @@@ -4702,10 -4888,14 +4932,14 @@@ live_symbol_holding (struct mem_node *m || off == offsetof (struct Lisp_Symbol, u.s.name) || off == offsetof (struct Lisp_Symbol, u.s.val) || off == offsetof (struct Lisp_Symbol, u.s.function) - || off == offsetof (struct Lisp_Symbol, u.s.plist) - || off == offsetof (struct Lisp_Symbol, u.s.next)) + || off == offsetof (struct Lisp_Symbol, u.s.package) + || off == offsetof (struct Lisp_Symbol, u.s.plist)) { struct Lisp_Symbol *s = p = cp -= off; + #if GC_ASAN_POISON_OBJECTS + if (__asan_region_is_poisoned (s, sizeof (*s))) + return NULL; + #endif if (!deadp (s->u.s.function)) return s; } @@@ -7141,10 -7601,11 +7395,11 @@@ sweep_symbols (void time we sweep this symbol_block (bug#29066). */ sym->u.s.redirect = SYMBOL_PLAINVAL; } - sym->u.s.next = symbol_free_list; + set_next_free_symbol (sym, symbol_free_list); symbol_free_list = sym; symbol_free_list->u.s.function = dead_object (); - ++this_free; + ASAN_POISON_SYMBOL (sym); + ++this_free; } else { @@@ -7163,7 -7624,8 +7418,8 @@@ { *sprev = sblk->next; /* Unhook from the free list. */ + ASAN_UNPOISON_SYMBOL (&sblk->symbols[0]); - symbol_free_list = sblk->symbols[0].u.s.next; + symbol_free_list = next_free_symbol (&sblk->symbols[0]); lisp_free (sblk); } else