[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#29066: 26.0.90; crash in gc involving buffer local symbols
From: |
Eli Zaretskii |
Subject: |
bug#29066: 26.0.90; crash in gc involving buffer local symbols |
Date: |
Tue, 31 Oct 2017 05:39:56 +0200 |
> From: Valentin Gatien-Baron <vgatien-baron@janestreet.com>
> Date: Mon, 30 Oct 2017 18:04:14 -0400
> Cc: 29066@debbugs.gnu.org,
> Mark Shinwell <mshinwell@janestreet.com>
>
> Yes, it fixes the problem.
Thanks.
> I also checked the following works, and seems better to me (stop having
> dangling pointers, instead of being
> careful with them):
>
> diff --git a/src/alloc.c b/src/alloc.c
> index da0c3ad4b3..44dfa95cf5 100644
> --- a/src/alloc.c
> +++ b/src/alloc.c
> @@ -7030,8 +7030,10 @@ sweep_symbols (void)
> {
> if (!sym->s.gcmarkbit)
> {
> - if (sym->s.redirect == SYMBOL_LOCALIZED)
> + if (sym->s.redirect == SYMBOL_LOCALIZED) {
> xfree (SYMBOL_BLV (&sym->s));
> + sym->s.val.blv = NULL;
> + }
That was my first attempt, but various macros like SYMBOL_BLV and
SET_SYMBOL_BLV insist on val.blv being non-NULL. I guess you've built
Emacs without --enable-checking, so you don't see the effect of that,
but if you do, you will have assertion violations with your patch.
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Valentin Gatien-Baron, 2017/10/30
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Eli Zaretskii, 2017/10/30
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Valentin Gatien-Baron, 2017/10/30
- bug#29066: 26.0.90; crash in gc involving buffer local symbols,
Eli Zaretskii <=
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Andreas Schwab, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Valentin Gatien-Baron, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Eli Zaretskii, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Valentin Gatien-Baron, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Eli Zaretskii, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Valentin Gatien-Baron, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Eli Zaretskii, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Andreas Schwab, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Eli Zaretskii, 2017/10/31
- bug#29066: 26.0.90; crash in gc involving buffer local symbols, Andreas Schwab, 2017/10/31