From: Noam Postavsky <npostavs@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Joost Kremers <joostkremers@fastmail.fm>,
40088@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#40088: 27.0.90; Symbol’s value as variable is void: debugger-outer-match-data
Date: Wed, 18 Mar 2020 20:04:56 -0400 [thread overview]
Message-ID: <87sgi55hw7.fsf@gmail.com> (raw)
In-Reply-To: <874kun6wam.fsf@gmail.com> (Noam Postavsky's message of "Tue, 17 Mar 2020 07:44:01 -0400")
Noam Postavsky <npostavs@gmail.com> writes:
>>> *** Eval error *** Symbol’s value as variable is void:
>>> debugger-outer-match-data
A simpler reproducer (although it only reproduces once per-session) is
(make-local-variable 'xx)
(let ((xx 1))
(backtrace--locals 1))
In Emacs 26, this gives
Debugger entered--Lisp error: (void-variable xx)
backtrace--locals(1)
(let ((xx 1)) (backtrace--locals 1))
...
eval-defun(nil)
...
The error shouldn't happen, but it's not as severe as in Emacs 27. I
think because in v27, the debugger display code got more fancy, and
recursively triggers the problem.
Since the void-variable is getting triggered from
backtrace_eval_unrewind, I tried the patch below, which almost seems to
fix the problem, but after continuing from the debugger there's a
segfault in GC, so it's definitely not the Right Thing. I think this is
a bit over my head. Ccing Stefan, any ideas?
diff --git i/src/data.c w/src/data.c
index b153068846..5ce5e360ab 100644
--- i/src/data.c
+++ w/src/data.c
@@ -1573,7 +1573,7 @@ notify_variable_watchers (Lisp_Object symbol,
/* Return the default value of SYMBOL, but don't check for voidness.
Return Qunbound if it is void. */
-static Lisp_Object
+Lisp_Object
default_value (Lisp_Object symbol)
{
struct Lisp_Symbol *sym;
diff --git i/src/eval.c w/src/eval.c
index 4559a0e1f6..78a787c4ff 100644
--- i/src/eval.c
+++ w/src/eval.c
@@ -3816,7 +3816,7 @@ backtrace_eval_unrewind (int distance)
{
Lisp_Object sym = specpdl_symbol (tmp);
Lisp_Object old_value = specpdl_old_value (tmp);
- set_specpdl_old_value (tmp, Fdefault_value (sym));
+ set_specpdl_old_value (tmp, default_value (sym));
Fset_default (sym, old_value);
}
break;
@@ -3832,7 +3832,7 @@ backtrace_eval_unrewind (int distance)
if (!NILP (Flocal_variable_p (symbol, where)))
{
set_specpdl_old_value
- (tmp, Fbuffer_local_value (symbol, where));
+ (tmp, buffer_local_value (symbol, where));
set_internal (symbol, old_value, where, SET_INTERNAL_UNBIND);
}
}
next prev parent reply other threads:[~2020-03-19 0:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 11:40 bug#40088: 27.0.90; Symbol’s value as variable is void: debugger-outer-match-data Joost Kremers
2020-03-17 1:01 ` Michael Heerdegen
2020-03-17 10:41 ` Robert Pluim
2020-03-17 11:06 ` Dmitry Gutov
2020-03-18 0:06 ` Michael Heerdegen
2020-03-18 0:12 ` bug#40088: 27.0.90; Symbol?s " Drew Adams
2020-03-18 1:44 ` Noam Postavsky
2020-03-18 1:49 ` Drew Adams
2020-03-18 22:31 ` Michael Heerdegen
2020-03-18 6:34 ` bug#40088: 27.0.90; Symbol’s " Dmitry Gutov
2020-03-18 22:24 ` Michael Heerdegen
2020-03-18 22:30 ` Dmitry Gutov
2020-03-18 22:46 ` Michael Heerdegen
2020-03-17 11:44 ` Noam Postavsky
2020-03-19 0:04 ` Noam Postavsky [this message]
2020-03-19 0:18 ` Stefan Monnier
2020-03-20 8:37 ` Noam Postavsky
2020-03-20 8:56 ` Eli Zaretskii
2020-03-21 23:47 ` Noam Postavsky
2020-03-22 14:25 ` Eli Zaretskii
2020-03-23 3:17 ` Noam Postavsky
2020-03-23 3:30 ` Eli Zaretskii
2020-03-23 3:40 ` Noam Postavsky
2020-03-23 14:16 ` Eli Zaretskii
2020-03-23 14:34 ` Noam Postavsky
2020-03-23 15:53 ` Joost Kremers
2020-03-20 13:20 ` Stefan Monnier
2020-03-20 14:00 ` Robert Pluim
2020-03-20 14:51 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgi55hw7.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=40088@debbugs.gnu.org \
--cc=joostkremers@fastmail.fm \
--cc=michael_heerdegen@web.de \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.