From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#40088: 27.0.90; =?UTF-8?Q?Symbol=E2=80=99s?= value as variable is void: debugger-outer-match-data Date: Wed, 18 Mar 2020 20:04:56 -0400 Message-ID: <87sgi55hw7.fsf@gmail.com> References: <87lfo0eddw.fsf@fastmail.fm> <87y2rz94m5.fsf@web.de> <874kun6wam.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="52358"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Joost Kremers , 40088@debbugs.gnu.org, Stefan Monnier To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 19 01:06:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEihR-000DMH-RZ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Mar 2020 01:06:13 +0100 Original-Received: from localhost ([::1]:59948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEihQ-0001o2-Kk for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Mar 2020 20:06:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54175) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEihH-0001nw-B6 for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 20:06:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEihG-00069y-5n for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 20:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35614) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEihF-00068u-W2 for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 20:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jEihF-0005jx-QM for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 20:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Mar 2020 00:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40088 X-GNU-PR-Package: emacs Original-Received: via spool by 40088-submit@debbugs.gnu.org id=B40088.158457630621983 (code B ref 40088); Thu, 19 Mar 2020 00:06:01 +0000 Original-Received: (at 40088) by debbugs.gnu.org; 19 Mar 2020 00:05:06 +0000 Original-Received: from localhost ([127.0.0.1]:41587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEigM-0005iV-44 for submit@debbugs.gnu.org; Wed, 18 Mar 2020 20:05:06 -0400 Original-Received: from mail-qk1-f181.google.com ([209.85.222.181]:46624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEigK-0005hx-CX for 40088@debbugs.gnu.org; Wed, 18 Mar 2020 20:05:04 -0400 Original-Received: by mail-qk1-f181.google.com with SMTP id f28so372688qkk.13 for <40088@debbugs.gnu.org>; Wed, 18 Mar 2020 17:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=yy01BL4iRzuaxzuIpM14bfa8csRQLTuJe4oKPhAFlqA=; b=HjxI9qfNRZwQizR7PMRLwp7M+gDYTnldY27+4h0rg5AHx1vCSOkekYPInUHgqHHr73 FlGYKs8yi1t9XgyS191MM5QSMqjQRDzD51+GxLNT3/XY8JAi47FyJ/Ez2J0mn4ubs2ye cXZfymlNXOgsmcwnyYA4LbNLpSaFZtB3jrd2g19cqFwbODoYcY2dAGKrGjhyu5K3WdYr jrzSYPByB4P2xhUsuAsARE+ETxM42ll16mzclHheARoXKiBMXdH5CHOyw0kh90tmn7KM f+HovggAj33+HkhkkyyS/mOSNdN4gUwvyAXzpDBJSjt8b3hsIPdTzGbMiiwklBzI0pbV Bc2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=yy01BL4iRzuaxzuIpM14bfa8csRQLTuJe4oKPhAFlqA=; b=HNdK4fwUwrAvrmTbcfJLMdyluJlFr/mBD6DZ5EtRubnNS38gz+7oXEhHixXZeEf369 rBsQmid/StqNr8w1ynx7rSwmkVLpYchUKBspR8acthtx6VMN9eYDvR0Vdn0xlfXT+B/P LzDTkZrKem5lagd7cpzkZCYNVjX53xIkf1Z8/zsukGa2UAM0JyD1nTOatRkqw3jmb+wB whuAW6jF04ULVgIkdJIXB2bOeL0jyDgvGGyZbd30Wywq9T0qwE6kFA5s7YeBY1PcW7Ei kk6NFXsOq/JIMAQ963bGNGHAmqo2OjoveEJ0Y1xyZ7Ipfpd14dSBfaogkYlj23jY1m28 xnTw== X-Gm-Message-State: ANhLgQ3IkUU8BRR0J7uvrwjTbqPzcPcm1EyQJAq3QR5zFlfmUzLXRg1X VvsUVtZx8Eo0+ze0UCt2MbU= X-Google-Smtp-Source: ADFU+vtldYhd6C4KszgF3i0UfPEjm7dhm0Io64ZLtby9p+MuukIlthQS2pf3NE1SzYBPPew5FzCtPw== X-Received: by 2002:a37:f502:: with SMTP id l2mr476392qkk.76.1584576298608; Wed, 18 Mar 2020 17:04:58 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id o81sm429358qke.24.2020.03.18.17.04.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Mar 2020 17:04:57 -0700 (PDT) In-Reply-To: <874kun6wam.fsf@gmail.com> (Noam Postavsky's message of "Tue, 17 Mar 2020 07:44:01 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177532 Archived-At: Noam Postavsky writes: >>> *** Eval error *** Symbol=E2=80=99s 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. */ =20 -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 =3D specpdl_symbol (tmp); Lisp_Object old_value =3D 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_UNBIN= D); } }