GNU bug report logs - #30846
26.0.91; debug-watch of kill-all-local-variables triggers 'assertion failed: found == !EQ (blv->defcell, blv->valcell)'

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> gmail.com>

Date: Sun, 18 Mar 2018 13:11:02 UTC

Severity: normal

Found in version 26.0.91

Fixed in versions 27.1, 26.2

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30846 <at> debbugs.gnu.org
Subject: bug#30846: 26.0.91; debug-watch of kill-all-local-variables triggers 'assertion failed: found == !EQ (blv->defcell, blv->valcell)'
Date: Sun, 18 Mar 2018 10:20:54 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Noam Postavsky <npostavs <at> gmail.com>
>> Date: Sun, 18 Mar 2018 09:10:41 -0400
>> 
>> Evaluate the following from 'emacs -Q':
>> 
>>     (setq-local foo 1)
>> 
>>     ;; Simulate (debug-watch 'foo) + continue from *Backtrace*
>>     (add-variable-watcher 'foo (lambda (symbol newval operation where)
>>                                  (with-temp-buffer
>>                                    (kill-all-local-variables))))
>>     (fundamental-mode)
>> 
>> This results in
>> 
>> ../../src/data.c:98: Emacs fatal error: assertion failed: found == !EQ (blv->defcell, blv->valcell)
>> 
>> Backtrace attached.  I guess it has something to do with the recursive
>> `kill-all-local-variables' call, although I'm not familiar enough with
>> the local variable machinery to say more about it.
>
> Do you mean that the inner call to kill-all-local-variables steps on
> toes of the outer call, and thus corrupts the local values or
> something?  If so, do you see any signs of such a corruption?  Because
> otherwise maybe the assertion is wrong?

No, I haven't seen any signs of corrupted values, though I'm not sure
exactly where to look.  It's possible the assertion is wrong (or more
precisely, that the variable watcher breaks the assertion without
breaking anything else).  I don't really understand what the assertion
is testing, at a high level (that is, why does it expect 'defcell' and
'valcell' to have that relation).





This bug report was last modified 6 years and 348 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.