From unknown Sat Jun 21 03:25:33 2025
X-Loop: help-debbugs@gnu.org
Subject: bug#41853: 28.0.50; Peculiar "args out of range" error when using Edebug
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 14 Jun 2020 14:23:01 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 41853
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 41853@debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.159214456822047
(code B ref -1); Sun, 14 Jun 2020 14:23:01 +0000
Received: (at submit) by debbugs.gnu.org; 14 Jun 2020 14:22:48 +0000
Received: from localhost ([127.0.0.1]:44276 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jkTX5-0005jW-GE
for submit@debbugs.gnu.org; Sun, 14 Jun 2020 10:22:47 -0400
Received: from lists.gnu.org ([209.51.188.17]:47442)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jkTX2-0005jO-TL
for submit@debbugs.gnu.org; Sun, 14 Jun 2020 10:22:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48038)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1jkTX2-0001Dy-NR
for bug-gnu-emacs@gnu.org; Sun, 14 Jun 2020 10:22:44 -0400
Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:40632)
by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1jkTX0-0003wD-RG
for bug-gnu-emacs@gnu.org; Sun, 14 Jun 2020 10:22:44 -0400
Received: by mail-ed1-x533.google.com with SMTP id p18so9622299eds.7
for ; Sun, 14 Jun 2020 07:22:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=R6qv1Rb1gLXkMV3jJo1tF+/VmzGXts3MR8z7zzIoOqs=;
b=DQCMoZOgIXPUnse7ok1/0jXAVWBRDfca86i++n16lQByShBkTyE1pCUXGXqKFHhV6P
VMlqH3z6BCtZCZB3LAbRUmI+En5vOdXDCJrSbVolo9hW3rgsL/y/sx2P6JB+n76vq1wv
F9fOVqk0FFkTuOJgt3ddtLIQwoeOTsrOhY6ptXH7s5mVekhUjZwGc+p63mRnwLFoUh1s
Sq0Zdz5HY15ZjgWDLg7XHrrGE5eGJBoho6Bn7/fkk/Y5jzMCrq/wD/78IkYqlejuqY6X
lxpQ24Hz/dWPh2zJagWOqNRpEE1SII6u393RQ/9CL4fVPVH3ZFl2GL+1Gi56huo2XfCy
S8xw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=R6qv1Rb1gLXkMV3jJo1tF+/VmzGXts3MR8z7zzIoOqs=;
b=JfrI8MItMIpndDwF2jJpWvTnZr/ruTrAwXXEDNX+SUhN8NJqt+ny7FaVm+3KstwAo0
2qn+MVCjJv6oxHPmZF41YqEQX4GqYD82KhJjgTEEh0c/dqrTOODuEuOPy6dP58awduWc
73s1S6CsqsRuJTQrUv8ypll9868v40GUhGvbDBCxRhdHBiHiIjvxw1yqcDMNh4/k2SyB
mf9EfZJGO/o/Fy1vrZ2xRhbYaa1DdmpnUp2VHow6hEfDzJyNhB+fFr7RIJSqXJ8EB2/U
8bE3zd+uWLNn2yDu6hFHmpEefLuQc7/PQM03yz6FDJ+jSpnPHMg2qkeMDDjW2DZG9mZD
EKKw==
X-Gm-Message-State: AOAM530mwjQJAGFnZlKXnIdtdXF8eSexXreFxEcfiHzYrI96tej4Uh+D
iBxjkfwOuEdlmSMuuI/7ljcEOoMPFQs=
X-Google-Smtp-Source: ABdhPJw3sQ2P5QjcChZvKcMl6/9ly/sRuGCMGYapCCeIlbJr3n0A9yKUem+mAD6kvjXRptsDteQHEw==
X-Received: by 2002:a50:9ead:: with SMTP id a42mr19351906edf.129.1592144554936;
Sun, 14 Jun 2020 07:22:34 -0700 (PDT)
Received: from phst1 ([2a02:2455:2a2:100:c351:ffcc:5d8e:4288])
by smtp.gmail.com with ESMTPSA id v5sm6988924ejx.123.2020.06.14.07.22.33
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 14 Jun 2020 07:22:34 -0700 (PDT)
From: Philipp Stephani
Date: Sun, 14 Jun 2020 16:22:32 +0200
Message-ID:
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2a00:1450:4864:20::533;
envelope-from=p.stephani2@gmail.com; helo=mail-ed1-x533.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
That's all we know.
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -2.1 (--)
This error is somewhat common when using `edebug-all-defuns'. It's not
easy to reproduce with a minimal example, but happens in real-world
code. For example, the following recipe works for me consistently:
1. Clone the Flycheck repository at commit
c02cd773dded0215f9417ec04dfe8dabda63ef43 (probably most other commits
also work, this is just for reproducibility).
2. Clone the dash.el repository at commit
ea4a4cc7cce7c3b93862a22df8bca8b83052ccbf (probably the exact commit
doesn't matter here as well).
3. Visit flycheck.el like so:
emacs -Q -L /src/dash.el/ -l edebug -f edebug-all-defuns \
-f toggle-debug-on-error flycheck.el
4. M-x eval-buffer
5. Step through macro expansions using the `G' key. Repeat until
`eval-buffer' is complete or has signalled and error.
6. At some point, there will be an error
edebug--display: Args out of range: [66 86 129 138 139], 5
without invoking the debugger or backtrace.
This looks like a bug in Edebug.
In GNU Emacs 28.0.50 (build 25, x86_64-pc-linux-gnu, GTK+ Version 3.24.14, =
cairo version 1.16.0)
of 2020-06-14
Repository revision: b3e7d046c3a94556fcaf6f9ce72aa2ecb20262a6
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12007000
System Description: Debian GNU/Linux rodete
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure --enable-gcc-warnings=3Dwarn-only
--enable-gtk-deprecation-warnings --without-pop --with-mailutils
--enable-checking --enable-check-lisp-object-type --with-modules
'CFLAGS=3D-O0 -ggdb3''
Configured features:
XPM JPEG TIFF GIF PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
XDBE XIM MODULES THREADS PDUMPER GMP
Important settings:
value of $LANG: en_US.utf8
value of $XMODIFIERS: @im=3Dibus
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils phst skeleton
derived edmacro kmacro pcase ffap thingatpt url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars mailcap subr-x rx gnutls puny seq
byte-opt gv bytecomp byte-compile cconv dbus xml compile comint
ansi-color ring cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 68581 6800)
(symbols 48 8624 1)
(strings 32 23721 1916)
(string-bytes 1 764482)
(vectors 16 13090)
(vector-slots 8 166268 6503)
(floats 8 25 36)
(intervals 56 213 0)
(buffers 992 11))
--=20
Google Germany GmbH
Erika-Mann-Stra=C3=9Fe 33
80636 M=C3=BCnchen
Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls Sie diese f=C3=A4lschlicherweise erhal=
ten haben
sollten, leiten Sie diese bitte nicht an jemand anderes weiter, l=C3=B6sche=
n Sie
alle Kopien und Anh=C3=A4nge davon und lassen Sie mich bitte wissen, dass d=
ie E-Mail
an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake,
please don=E2=80=99t forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.
From unknown Sat Jun 21 03:25:33 2025
X-Loop: help-debbugs@gnu.org
Subject: bug#41853: 28.0.50; Peculiar "args out of range" error when using Edebug
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 14 Jun 2020 15:21:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41853
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 41853@debbugs.gnu.org
Received: via spool by 41853-submit@debbugs.gnu.org id=B41853.15921480333081
(code B ref 41853); Sun, 14 Jun 2020 15:21:02 +0000
Received: (at 41853) by debbugs.gnu.org; 14 Jun 2020 15:20:33 +0000
Received: from localhost ([127.0.0.1]:44304 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jkUQz-0000nd-2c
for submit@debbugs.gnu.org; Sun, 14 Jun 2020 11:20:33 -0400
Received: from mail-oi1-f179.google.com ([209.85.167.179]:45237)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jkUQx-0000nQ-If
for 41853@debbugs.gnu.org; Sun, 14 Jun 2020 11:20:31 -0400
Received: by mail-oi1-f179.google.com with SMTP id p70so13534532oic.12
for <41853@debbugs.gnu.org>; Sun, 14 Jun 2020 08:20:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=E+drDdl5d4A6dtmlnBa+Hey92OsHc6B3FBb6Xz6sysk=;
b=lwz7b/8YdoIHi8kIeJjGy5ACocOMp79prY6DAIVGgDGNunUbm7AQguY4Ski+Yn++HK
g19PzWoJNrZxIXdrDrTpkNEI6wRPdVX1j+5fVi/E7hdp9DFAg7jF2giN1xlBtrHMikQj
n/AUbLRXnc0axyDwnFZK41rYQYJu7HS+ufs+0C1Fqq/QTLAFID5I122HMatI3sgrzeAO
NX+dDeS2/OpJihMahocYSElmQPxItV1XMe7mV2wqZ0/k+t7btcGJy6lld5Wo/mri54wp
iE/QMakrKrhAe6OXgEkVPh/h7eXzlnO46QoTJ2n+in4BSYnaVhj4EKCesFSyrSUKA0fO
k/ww==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=E+drDdl5d4A6dtmlnBa+Hey92OsHc6B3FBb6Xz6sysk=;
b=RGbjzmyf4nHJmj8MZ8PgdEZOcMsN/N2cTWTSK1GNX/IXTfmqDiRZhu7kD7uP9Jap2/
/XxQ1VCO7tCXadBMqA3oJ+KwjmfnSxOziZr1NPVq8e7Y9uMC9Rg6tm7pN1vzbYyVL3hg
y0UoiMwco58sO8Oub/wvJzFqZxgK8ChKDBC5MLlkw1syj1Ppk1K2WCu2HjQnErnK8ev5
uUlz+EQKZirF89+Zft1kf3KzEfL8t6PcowffIQKl6cM8tIvqAub9emtHut2tTugwDj1O
7kaErWtmBTksRUfh3ormROx9dv5OpkSxECgqk+JRQfi87lWqPeGsPCQ2+ige/2mxGN0Z
iOuA==
X-Gm-Message-State: AOAM530w90vcvPd3fBFloKBVEDZsySm6fwR9/R9oxJhjbP+NQxrrEPTN
+YB5228qKGq7D2hi5eG1KTjAquJ9L2+qV87Ch/UCH+dN7PQ=
X-Google-Smtp-Source: ABdhPJwO86CnX9ufqiOmOGgqRa9aP5ED+//ALmr84My4hR9IIYRjEybBnzW73HgShoodWYs0h2c8f5Dk0ynqzdwfRO0=
X-Received: by 2002:aca:51ca:: with SMTP id f193mr6062815oib.170.1592148025509;
Sun, 14 Jun 2020 08:20:25 -0700 (PDT)
MIME-Version: 1.0
References:
In-Reply-To:
From: Philipp Stephani
Date: Sun, 14 Jun 2020 17:20:14 +0200
Message-ID:
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.8 (/)
Am So., 14. Juni 2020 um 16:23 Uhr schrieb Philipp Stephani
:
>
>
> This error is somewhat common when using `edebug-all-defuns'. It's not
> easy to reproduce with a minimal example, but happens in real-world
> code. For example, the following recipe works for me consistently:
>
> 1. Clone the Flycheck repository at commit
> c02cd773dded0215f9417ec04dfe8dabda63ef43 (probably most other commits
> also work, this is just for reproducibility).
>
> 2. Clone the dash.el repository at commit
> ea4a4cc7cce7c3b93862a22df8bca8b83052ccbf (probably the exact commit
> doesn't matter here as well).
>
> 3. Visit flycheck.el like so:
>
> emacs -Q -L /src/dash.el/ -l edebug -f edebug-all-defuns \
> -f toggle-debug-on-error flycheck.el
>
> 4. M-x eval-buffer
>
> 5. Step through macro expansions using the `G' key. Repeat until
> `eval-buffer' is complete or has signalled and error.
>
> 6. At some point, there will be an error
>
> edebug--display: Args out of range: [66 86 129 138 139], 5
>
> without invoking the debugger or backtrace.
>
> This looks like a bug in Edebug.
>
The immediate trigger appears to be that in `edebug-slow-after' for
`flycheck--checker-property-name' the AFTER-INDEX is out of range for
the EDEBUG-FREQ-COUNT vector. I still don't understand why though;
there must be some part in edebug that misinstruments these forms.
The vector [66 86 129 138 139] is likely a vector of offsets, not
frequencies; the vector matches the setter for flycheck-checker-get
quite well. So maybe there's an issue with how edebug instruments
gv-define-setter?
From unknown Sat Jun 21 03:25:33 2025
X-Loop: help-debbugs@gnu.org
Subject: bug#41853: 28.0.50; Peculiar "args out of range" error when using Edebug
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 14 Jun 2020 15:36:01 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41853
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 41853@debbugs.gnu.org
Received: via spool by 41853-submit@debbugs.gnu.org id=B41853.15921489554518
(code B ref 41853); Sun, 14 Jun 2020 15:36:01 +0000
Received: (at 41853) by debbugs.gnu.org; 14 Jun 2020 15:35:55 +0000
Received: from localhost ([127.0.0.1]:44316 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jkUfr-0001Ao-D7
for submit@debbugs.gnu.org; Sun, 14 Jun 2020 11:35:55 -0400
Received: from mail-oi1-f176.google.com ([209.85.167.176]:45809)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jkUfp-0001Ab-OD
for 41853@debbugs.gnu.org; Sun, 14 Jun 2020 11:35:54 -0400
Received: by mail-oi1-f176.google.com with SMTP id p70so13558144oic.12
for <41853@debbugs.gnu.org>; Sun, 14 Jun 2020 08:35:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=uc82JokgjbWAeOphXp1UovrpfbamJNQtIuYFiGut0AU=;
b=E8Qd5NAP867ZYjlZsGnKn/crjfA+dz2qwx5J/3LTeajgTNS6BH1F1utYuk75TNW9t+
zy0MX6LJs3ZzKuRdxF7RF6RgPYyacDjK/wBRNpKj63LxQnKYIHqMZ6NxYf4WXGBiKpjR
8lEv9hPCtcMTmjELgwcEVLsWMdwwV0eHqpy9W05XwePF6ipRiKVfOUBSTWdUFc9TgANZ
xQhRKBaUQM1Ii00V1FnmJYtSWZq0gq6RYo2kPxDWtO2DqKRUkIk7Oz6iWBfDt4nj3wkD
Tdg7joeJNp/SEnoyyTB/LPIi/efr2BUbo7bFtyhK98cKfFi0hCwHT9ac+yWYRxSXrVSw
rHVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=uc82JokgjbWAeOphXp1UovrpfbamJNQtIuYFiGut0AU=;
b=Oy6JF4RZz+taayg/iDUn7sW4RgWOMShgJBrgdithUcJcwybyHcEgBjAR08fty5dPM0
mn+3+9zhCXVpHNzHrq5yrkHMEz7Ny4oSPg4b94qdOuPSCm/DosZnSFk/QOaFOkap2WeT
//LzhNT6nBFI+Jf35XudFuuFZD/GKO3r9YVn80nFL3052a+2gqZnwZmVmI9lZFWipe/D
P7L9kR4CPaBGsa/+wvR9RCPllPPk3oIPbIb/ozcF9hlWMGeDAx1a6VluMTsFofoTuWcP
Ac1dqG+6bOwhKeoDZl09id9nNEtWPnMMiMmiE/WrPu6ORcytexn4FM+T1jRN2HSMUKhE
bYZQ==
X-Gm-Message-State: AOAM5331nVxWfPHe0yJWKR2JLEZX9NkamL9I/EbOVsr+3DJgFZqynljY
qyI6tkAvFBkTPJSZAp5Pb0ShSz54dZO9hdkt9O8KHTKTGl0=
X-Google-Smtp-Source: ABdhPJwukq+8AzXexTE1Z7EUNKe1jLyNLsU5ApVOlFSZL+zuTBNsnEIXMpLu+k+X+DUySYGtKyCNO8zgUJTdXS6kZzM=
X-Received: by 2002:aca:b742:: with SMTP id h63mr6051536oif.65.1592148947652;
Sun, 14 Jun 2020 08:35:47 -0700 (PDT)
MIME-Version: 1.0
References:
In-Reply-To:
From: Philipp Stephani
Date: Sun, 14 Jun 2020 17:35:36 +0200
Message-ID:
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.8 (/)
Am So., 14. Juni 2020 um 17:20 Uhr schrieb Philipp Stephani
:
>
> Am So., 14. Juni 2020 um 16:23 Uhr schrieb Philipp Stephani
> :
> >
> >
> > This error is somewhat common when using `edebug-all-defuns'. It's not
> > easy to reproduce with a minimal example, but happens in real-world
> > code. For example, the following recipe works for me consistently:
> >
> > 1. Clone the Flycheck repository at commit
> > c02cd773dded0215f9417ec04dfe8dabda63ef43 (probably most other commits
> > also work, this is just for reproducibility).
> >
> > 2. Clone the dash.el repository at commit
> > ea4a4cc7cce7c3b93862a22df8bca8b83052ccbf (probably the exact commit
> > doesn't matter here as well).
> >
> > 3. Visit flycheck.el like so:
> >
> > emacs -Q -L /src/dash.el/ -l edebug -f edebug-all-defuns \
> > -f toggle-debug-on-error flycheck.el
> >
> > 4. M-x eval-buffer
> >
> > 5. Step through macro expansions using the `G' key. Repeat until
> > `eval-buffer' is complete or has signalled and error.
> >
> > 6. At some point, there will be an error
> >
> > edebug--display: Args out of range: [66 86 129 138 139], 5
> >
> > without invoking the debugger or backtrace.
> >
> > This looks like a bug in Edebug.
> >
>
>
> The immediate trigger appears to be that in `edebug-slow-after' for
> `flycheck--checker-property-name' the AFTER-INDEX is out of range for
> the EDEBUG-FREQ-COUNT vector. I still don't understand why though;
> there must be some part in edebug that misinstruments these forms.
> The vector [66 86 129 138 139] is likely a vector of offsets, not
> frequencies; the vector matches the setter for flycheck-checker-get
> quite well. So maybe there's an issue with how edebug instruments
> gv-define-setter?
Yup, looks like this is the root of the issue. Minimal example:
$ cat /tmp/a.el
(defun foo (b) b)
(defun my-get (a b) (get a (foo b)))
(gv-define-setter my-get (x a b) `(setf (get ,a (foo ,b)) ,x))
(push 'foo (my-get 'foo 'bar))
$ emacs -Q -l edebug -f edebug-all-defuns /tmp/a.el
Then run M-x eval-buffer and hit G three times. Error:
edebug--display: Args out of range: [33 47 55 60 61], 5
Could the problem here be that to find the instrumentation metadata of
SYMBOL edebug uses (get SYMBOL 'edebug), and that it doesn't detect
that the setter for `my-get' is a new entity?
From unknown Sat Jun 21 03:25:33 2025
X-Loop: help-debbugs@gnu.org
Subject: bug#41853: 28.0.50; Peculiar "args out of range" error when using Edebug
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 14 Jun 2020 15:49:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41853
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 41853@debbugs.gnu.org
Received: via spool by 41853-submit@debbugs.gnu.org id=B41853.15921497385791
(code B ref 41853); Sun, 14 Jun 2020 15:49:02 +0000
Received: (at 41853) by debbugs.gnu.org; 14 Jun 2020 15:48:58 +0000
Received: from localhost ([127.0.0.1]:44333 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jkUsU-0001VL-DN
for submit@debbugs.gnu.org; Sun, 14 Jun 2020 11:48:58 -0400
Received: from mail-oo1-f48.google.com ([209.85.161.48]:37034)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jkUsS-0001V4-Id
for 41853@debbugs.gnu.org; Sun, 14 Jun 2020 11:48:56 -0400
Received: by mail-oo1-f48.google.com with SMTP id q188so2892250ooq.4
for <41853@debbugs.gnu.org>; Sun, 14 Jun 2020 08:48:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=tSmMk2swMQMWHiN93tlr2DC2GhEr4vq948Y21J8Ioi0=;
b=sVOzW4YdOLYH11y5w4xN4K9te0ViRfKgrx5lTLZ6+smGwyId/JwTfGddFBlWl2c2dv
HbgBn2J7vXmo72wRsPP63tkpbBTiZZfqdH7+IMR4zfqsO089+Hy5pOw0nznAP2ysOo0g
ycXOBEdt1KrhBAbEsmsuSDYUjc3cjx5V4WT9coZvM2pxpN6dP1YxUNaxXy1uFJVtlih5
++klb8mXeWtZ3uNeXQeilWWuiUddfd75by9ls247n5eID7whiEaMIt8ZEHd50zJVZNah
3OVeJvjDe0VOb1c8iH/R/4rH60PB73TXyZ8CTcSwUxq69SaNK410TkjSfg5sRyIfHOB5
OB3g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=tSmMk2swMQMWHiN93tlr2DC2GhEr4vq948Y21J8Ioi0=;
b=DUrB3DhcAN+HGygy7THt86BHu42puFDs+tBOuOlZekrzIKHDN/TvGM/+IkTxHxFgvp
qjGIIfcKX/PYsG26L2yUTwdM6/fAy4GhsiEMgsqJmlMtQflJ/NcYFCYUB3oP9FhiI4wR
ZRC9fyhfB1O0MZxqp2JbXkswbTuMWvadI/yuo2DNmbNauTsdPG/XjVGj4J6ZJLDrZ4zE
ICNYIAHZPNz0oXz6T69vlpAP7Rb6MdAMyl7+L1NVbO8NtdMROLKEZu+cXDPjQ1E1EE7V
WgAeo9eShrSpAuBDw15+PalRahBY80MpULzaaXoZf/E7XWpuZBnc+xEhJ4F6S3hRLZKd
Yzmw==
X-Gm-Message-State: AOAM530TwwuNPeK/a7S8SHMocahsamNFoWYcluZ4sotkrBRJhMlwKlvR
A2WGInVzd+FsnLXU99C3DlvNyaNNipWNXkFnrm1P8o8Lrqc=
X-Google-Smtp-Source: ABdhPJxbK5gapzss6q407/dSQp2TkrcpjE/2BZh2cYOo6fBpWzTP/SuyjpykH5lJGiwKCr+XKUKEJ2RJP+56gImNskM=
X-Received: by 2002:a4a:d1ac:: with SMTP id z12mr18174451oor.60.1592149730655;
Sun, 14 Jun 2020 08:48:50 -0700 (PDT)
MIME-Version: 1.0
References:
In-Reply-To:
From: Philipp Stephani
Date: Sun, 14 Jun 2020 17:48:39 +0200
Message-ID:
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.8 (/)
Am So., 14. Juni 2020 um 17:35 Uhr schrieb Philipp Stephani
:
>
> Am So., 14. Juni 2020 um 17:20 Uhr schrieb Philipp Stephani
> :
> >
> > Am So., 14. Juni 2020 um 16:23 Uhr schrieb Philipp Stephani
> > :
> > >
> > >
> > > This error is somewhat common when using `edebug-all-defuns'. It's not
> > > easy to reproduce with a minimal example, but happens in real-world
> > > code. For example, the following recipe works for me consistently:
> > >
> > > 1. Clone the Flycheck repository at commit
> > > c02cd773dded0215f9417ec04dfe8dabda63ef43 (probably most other commits
> > > also work, this is just for reproducibility).
> > >
> > > 2. Clone the dash.el repository at commit
> > > ea4a4cc7cce7c3b93862a22df8bca8b83052ccbf (probably the exact commit
> > > doesn't matter here as well).
> > >
> > > 3. Visit flycheck.el like so:
> > >
> > > emacs -Q -L /src/dash.el/ -l edebug -f edebug-all-defuns \
> > > -f toggle-debug-on-error flycheck.el
> > >
> > > 4. M-x eval-buffer
> > >
> > > 5. Step through macro expansions using the `G' key. Repeat until
> > > `eval-buffer' is complete or has signalled and error.
> > >
> > > 6. At some point, there will be an error
> > >
> > > edebug--display: Args out of range: [66 86 129 138 139], 5
> > >
> > > without invoking the debugger or backtrace.
> > >
> > > This looks like a bug in Edebug.
> > >
> >
> >
> > The immediate trigger appears to be that in `edebug-slow-after' for
> > `flycheck--checker-property-name' the AFTER-INDEX is out of range for
> > the EDEBUG-FREQ-COUNT vector. I still don't understand why though;
> > there must be some part in edebug that misinstruments these forms.
> > The vector [66 86 129 138 139] is likely a vector of offsets, not
> > frequencies; the vector matches the setter for flycheck-checker-get
> > quite well. So maybe there's an issue with how edebug instruments
> > gv-define-setter?
>
> Yup, looks like this is the root of the issue. Minimal example:
>
> $ cat /tmp/a.el
> (defun foo (b) b)
> (defun my-get (a b) (get a (foo b)))
> (gv-define-setter my-get (x a b) `(setf (get ,a (foo ,b)) ,x))
> (push 'foo (my-get 'foo 'bar))
>
> $ emacs -Q -l edebug -f edebug-all-defuns /tmp/a.el
>
> Then run M-x eval-buffer and hit G three times. Error:
> edebug--display: Args out of range: [33 47 55 60 61], 5
>
> Could the problem here be that to find the instrumentation metadata of
> SYMBOL edebug uses (get SYMBOL 'edebug), and that it doesn't detect
> that the setter for `my-get' is a new entity?
So it looks more and more like the implementation of
`edebug-read-and-maybe-wrap-form1' generally doesn't support this use
case well at all. If the Edebug spec is `(&define name...)', then it
appears to blindly assume that the form being instrumented is the only
form defining NAME. That's clearly incorrect as NAME can mean
different kinds of entities depending on what the defining macro
happens to define.
I guess for `gv-define-setter' we can work around this by adding
`:name gv-setter' to the edebug specification, but the issue should be
fixed (or at least detected) in Edebug more generally. Also debugging
this is extremely hard because there's no backtrace etc.
From unknown Sat Jun 21 03:25:33 2025
X-Loop: help-debbugs@gnu.org
Subject: bug#41853: 28.0.50; Peculiar "args out of range" error when using Edebug
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 14 Jun 2020 16:24:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41853
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 41853@debbugs.gnu.org
Received: via spool by 41853-submit@debbugs.gnu.org id=B41853.15921518029120
(code B ref 41853); Sun, 14 Jun 2020 16:24:02 +0000
Received: (at 41853) by debbugs.gnu.org; 14 Jun 2020 16:23:22 +0000
Received: from localhost ([127.0.0.1]:44378 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jkVPm-0002N2-2C
for submit@debbugs.gnu.org; Sun, 14 Jun 2020 12:23:22 -0400
Received: from mail-ot1-f47.google.com ([209.85.210.47]:33629)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jkVPk-0002Mi-9g
for 41853@debbugs.gnu.org; Sun, 14 Jun 2020 12:23:20 -0400
Received: by mail-ot1-f47.google.com with SMTP id n6so11259230otl.0
for <41853@debbugs.gnu.org>; Sun, 14 Jun 2020 09:23:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=4anzw0CzWYPZ93exhabaLptn3QzoWIQ9kXt/DhgtefA=;
b=IjL8VANMciQXS1orJG/EYaynY/0f0eqA4vBa4N+YjE9te6kgY5fOsOn8OQSVDCoXku
/L8kfKACuU1LjD/ZLkzqu2ZawgX57qfzj8iJY6cAeD1nX8Hv1Y5KG1zVZdebntn0uAK5
8bEoXydzBRTsZDTuw8yIoZJXNWZ6FRVJq6+eAIvTwbOPaCvQlq2LW31VQiJHP80uNOWZ
D5lhxRdvSJ8SWMIdz6Yb6/75UtXlYu50qnyWh6ww0kHT5dooawd7yvWxO0plmDwSF7xm
XMaL1YYYgOg6rfY2A5KkLn/mknsjv9DAcrdxZTug93+I72/atgM5BcZlh41oAjb1ti9e
p2Pw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=4anzw0CzWYPZ93exhabaLptn3QzoWIQ9kXt/DhgtefA=;
b=iR3umzlX2jUfdgiMxv2aYK+a8YN+5sRGIN8K8uLVziAm1bT0nVyzU0IEk4BvgHSl2l
YfMviTCyplIMMcsGQB+EOEbI9gqaWdQA6lmzBh2mV55Z/L3moHBLGGpw4Gmn6U0NesT4
CLcl0M9/7QKH10qGBp1Kn16G8hXMkuPQ5gs+Ra5P6f4ZRc/Zuus0d+lj/Stxfy4466Oj
CXvHf3QaTw8yp7lYZy/OmS2tGyWWTOLBqbZqKkbeMWtc/IsKJz3nEsX0654PUE7+6kqb
GIh8N+gLpp+0hWDpn10u7HdVRU5ERrpjcMhVYtL+vohThXYUrW+n7IZarZ7o+53Tkidi
h/iw==
X-Gm-Message-State: AOAM533Y7987X1rDkYPr0gi9/+qObhXFaxKAN3mXQ6ElrDWAbWdNH8AQ
7/qQU+ufByyWk1PB4wAx8oGWTZs6MkPVze5H0zcg04I6swA=
X-Google-Smtp-Source: ABdhPJy+kFf8OKDwGVJrQUA1q4aB7ngLsb+XZ0UV2+JiWvgCxSNX5Q6DcJhBfp2tjjInFE6oqUuoHGLpFTb3ENrto4E=
X-Received: by 2002:a05:6830:242e:: with SMTP id
k14mr18346162ots.36.1592151794150;
Sun, 14 Jun 2020 09:23:14 -0700 (PDT)
MIME-Version: 1.0
References:
In-Reply-To:
From: Philipp Stephani
Date: Sun, 14 Jun 2020 18:23:02 +0200
Message-ID:
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.8 (/)
Am So., 14. Juni 2020 um 17:48 Uhr schrieb Philipp Stephani
:
>
> Am So., 14. Juni 2020 um 17:35 Uhr schrieb Philipp Stephani
> :
> >
> > Am So., 14. Juni 2020 um 17:20 Uhr schrieb Philipp Stephani
> > :
> > >
> > > Am So., 14. Juni 2020 um 16:23 Uhr schrieb Philipp Stephani
> > > :
> > > >
> > > >
> > > > This error is somewhat common when using `edebug-all-defuns'. It's not
> > > > easy to reproduce with a minimal example, but happens in real-world
> > > > code. For example, the following recipe works for me consistently:
> > > >
> > > > 1. Clone the Flycheck repository at commit
> > > > c02cd773dded0215f9417ec04dfe8dabda63ef43 (probably most other commits
> > > > also work, this is just for reproducibility).
> > > >
> > > > 2. Clone the dash.el repository at commit
> > > > ea4a4cc7cce7c3b93862a22df8bca8b83052ccbf (probably the exact commit
> > > > doesn't matter here as well).
> > > >
> > > > 3. Visit flycheck.el like so:
> > > >
> > > > emacs -Q -L /src/dash.el/ -l edebug -f edebug-all-defuns \
> > > > -f toggle-debug-on-error flycheck.el
> > > >
> > > > 4. M-x eval-buffer
> > > >
> > > > 5. Step through macro expansions using the `G' key. Repeat until
> > > > `eval-buffer' is complete or has signalled and error.
> > > >
> > > > 6. At some point, there will be an error
> > > >
> > > > edebug--display: Args out of range: [66 86 129 138 139], 5
> > > >
> > > > without invoking the debugger or backtrace.
> > > >
> > > > This looks like a bug in Edebug.
> > > >
> > >
> > >
> > > The immediate trigger appears to be that in `edebug-slow-after' for
> > > `flycheck--checker-property-name' the AFTER-INDEX is out of range for
> > > the EDEBUG-FREQ-COUNT vector. I still don't understand why though;
> > > there must be some part in edebug that misinstruments these forms.
> > > The vector [66 86 129 138 139] is likely a vector of offsets, not
> > > frequencies; the vector matches the setter for flycheck-checker-get
> > > quite well. So maybe there's an issue with how edebug instruments
> > > gv-define-setter?
> >
> > Yup, looks like this is the root of the issue. Minimal example:
> >
> > $ cat /tmp/a.el
> > (defun foo (b) b)
> > (defun my-get (a b) (get a (foo b)))
> > (gv-define-setter my-get (x a b) `(setf (get ,a (foo ,b)) ,x))
> > (push 'foo (my-get 'foo 'bar))
> >
> > $ emacs -Q -l edebug -f edebug-all-defuns /tmp/a.el
> >
> > Then run M-x eval-buffer and hit G three times. Error:
> > edebug--display: Args out of range: [33 47 55 60 61], 5
> >
> > Could the problem here be that to find the instrumentation metadata of
> > SYMBOL edebug uses (get SYMBOL 'edebug), and that it doesn't detect
> > that the setter for `my-get' is a new entity?
>
> So it looks more and more like the implementation of
> `edebug-read-and-maybe-wrap-form1' generally doesn't support this use
> case well at all. If the Edebug spec is `(&define name...)', then it
> appears to blindly assume that the form being instrumented is the only
> form defining NAME. That's clearly incorrect as NAME can mean
> different kinds of entities depending on what the defining macro
> happens to define.
> I guess for `gv-define-setter' we can work around this by adding
> `:name gv-setter' to the edebug specification, but the issue should be
> fixed (or at least detected) in Edebug more generally. Also debugging
> this is extremely hard because there's no backtrace etc.
I've now fixed the gv-setter issue with commit 62cf8f1649, but I'll
leave this bug open to track fixes for this class of issues in
edebug.el, as well as debuggability improvements.
From unknown Sat Jun 21 03:25:33 2025
X-Loop: help-debbugs@gnu.org
Subject: bug#41853: 28.0.50; Peculiar "args out of range" error when using Edebug
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 21 Jun 2020 13:41:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41853
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 41853@debbugs.gnu.org
Received: via spool by 41853-submit@debbugs.gnu.org id=B41853.159274685216137
(code B ref 41853); Sun, 21 Jun 2020 13:41:02 +0000
Received: (at 41853) by debbugs.gnu.org; 21 Jun 2020 13:40:52 +0000
Received: from localhost ([127.0.0.1]:59358 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jn0DM-0004CC-9w
for submit@debbugs.gnu.org; Sun, 21 Jun 2020 09:40:52 -0400
Received: from mail-oi1-f173.google.com ([209.85.167.173]:46921)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jn0DK-0004Bz-Be
for 41853@debbugs.gnu.org; Sun, 21 Jun 2020 09:40:50 -0400
Received: by mail-oi1-f173.google.com with SMTP id 25so13155523oiy.13
for <41853@debbugs.gnu.org>; Sun, 21 Jun 2020 06:40:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=YF//K8ZvZuqM5OwqhDSF6VzP2zit552h9tDT2jWmvRk=;
b=ButqVED72b42M/7SpZV3L7frN1TEcZJ4xDLCo8lWi/GGXEzKFfCV2PBWaBHJukHWuO
xNuGImgPr840u/AhYBknU0IbSGUzkANbksUpBJbRGlU/VVVp/IE0SX1liOrHIK+JoewO
DpSdn/wGal2DQNVsSgjg7IdGTT8a7rkwDZZrs1xH7eCMuUhgWo23nUp3Dz+UdPaHWYJA
FncEETmTUL6BjeGS+2m0C96MtOgagIxQSrNMqTaWloCYFmYzeaTHkWgi7mg6wg84BGS4
Z8j82BeThz8WKf8R7my+xP8zIAxm9j8bBUhMKrDjVuDglRYbEO03FqqeMswEy8SQTHUO
oTIQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=YF//K8ZvZuqM5OwqhDSF6VzP2zit552h9tDT2jWmvRk=;
b=RMdY2vcrL+3WpVTUEkEnyojDGKcoOXxjJuspynq3zcbqo52yF77piMOMWtiTUJXRex
KHZ2o7k/1Kx1JVlpy4DW9OdMPPu+9Mg0XBoZuqKCFrt2ZUcOsdOdF7hh/NOV8nvXbhww
kdT1s8X5RqGKG6SiLhH3VWko9fE/plcvAjVfC7zs1Fo1oWQcOELZQEaUXng1jItqdyHf
tgbsmcZUoYcUbFSpPv7BE41+5bl+d4d82e7Az0+3XxEl3gJGELsbmIKFyy/AB3nP5b+w
3+wwG5GLJrdZaQYOmro5kdqDm+B1bs1tHCeWV8GU7Yq3VDlvyEDa+ZZrrD8EW1JMElRm
capg==
X-Gm-Message-State: AOAM531fwC27ztzyMZfQVP/jtKVVNLLDpUEJauogoJpHMeCXZwCkWnV3
g7vN7qDobf+2IvJOQdTdjI83mwTqjIOn1ilzzIdkjA1hKsY=
X-Google-Smtp-Source: ABdhPJyKRfB1Z0Egg1zbUmG2eDsirO/bGIDsh8R1kW4S0waI44FbT4CBcfnje6LI86c+R8mOqjm5trmkhtUG2XJ4Dt4=
X-Received: by 2002:aca:4a4b:: with SMTP id x72mr9539303oia.9.1592746844378;
Sun, 21 Jun 2020 06:40:44 -0700 (PDT)
MIME-Version: 1.0
References:
In-Reply-To:
From: Philipp Stephani
Date: Sun, 21 Jun 2020 15:40:33 +0200
Message-ID:
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.8 (/)
Am So., 14. Juni 2020 um 18:23 Uhr schrieb Philipp Stephani
:
>
> Am So., 14. Juni 2020 um 17:48 Uhr schrieb Philipp Stephani
> :
> >
> > Am So., 14. Juni 2020 um 17:35 Uhr schrieb Philipp Stephani
> > :
> > >
> > > Am So., 14. Juni 2020 um 17:20 Uhr schrieb Philipp Stephani
> > > :
> > > >
> > > > Am So., 14. Juni 2020 um 16:23 Uhr schrieb Philipp Stephani
> > > > :
> > > > >
> > > > >
> > > > > This error is somewhat common when using `edebug-all-defuns'. It's not
> > > > > easy to reproduce with a minimal example, but happens in real-world
> > > > > code. For example, the following recipe works for me consistently:
> > > > >
> > > > > 1. Clone the Flycheck repository at commit
> > > > > c02cd773dded0215f9417ec04dfe8dabda63ef43 (probably most other commits
> > > > > also work, this is just for reproducibility).
> > > > >
> > > > > 2. Clone the dash.el repository at commit
> > > > > ea4a4cc7cce7c3b93862a22df8bca8b83052ccbf (probably the exact commit
> > > > > doesn't matter here as well).
> > > > >
> > > > > 3. Visit flycheck.el like so:
> > > > >
> > > > > emacs -Q -L /src/dash.el/ -l edebug -f edebug-all-defuns \
> > > > > -f toggle-debug-on-error flycheck.el
> > > > >
> > > > > 4. M-x eval-buffer
> > > > >
> > > > > 5. Step through macro expansions using the `G' key. Repeat until
> > > > > `eval-buffer' is complete or has signalled and error.
> > > > >
> > > > > 6. At some point, there will be an error
> > > > >
> > > > > edebug--display: Args out of range: [66 86 129 138 139], 5
> > > > >
> > > > > without invoking the debugger or backtrace.
> > > > >
> > > > > This looks like a bug in Edebug.
> > > > >
> > > >
> > > >
> > > > The immediate trigger appears to be that in `edebug-slow-after' for
> > > > `flycheck--checker-property-name' the AFTER-INDEX is out of range for
> > > > the EDEBUG-FREQ-COUNT vector. I still don't understand why though;
> > > > there must be some part in edebug that misinstruments these forms.
> > > > The vector [66 86 129 138 139] is likely a vector of offsets, not
> > > > frequencies; the vector matches the setter for flycheck-checker-get
> > > > quite well. So maybe there's an issue with how edebug instruments
> > > > gv-define-setter?
> > >
> > > Yup, looks like this is the root of the issue. Minimal example:
> > >
> > > $ cat /tmp/a.el
> > > (defun foo (b) b)
> > > (defun my-get (a b) (get a (foo b)))
> > > (gv-define-setter my-get (x a b) `(setf (get ,a (foo ,b)) ,x))
> > > (push 'foo (my-get 'foo 'bar))
> > >
> > > $ emacs -Q -l edebug -f edebug-all-defuns /tmp/a.el
> > >
> > > Then run M-x eval-buffer and hit G three times. Error:
> > > edebug--display: Args out of range: [33 47 55 60 61], 5
> > >
> > > Could the problem here be that to find the instrumentation metadata of
> > > SYMBOL edebug uses (get SYMBOL 'edebug), and that it doesn't detect
> > > that the setter for `my-get' is a new entity?
> >
> > So it looks more and more like the implementation of
> > `edebug-read-and-maybe-wrap-form1' generally doesn't support this use
> > case well at all. If the Edebug spec is `(&define name...)', then it
> > appears to blindly assume that the form being instrumented is the only
> > form defining NAME. That's clearly incorrect as NAME can mean
> > different kinds of entities depending on what the defining macro
> > happens to define.
> > I guess for `gv-define-setter' we can work around this by adding
> > `:name gv-setter' to the edebug specification, but the issue should be
> > fixed (or at least detected) in Edebug more generally. Also debugging
> > this is extremely hard because there's no backtrace etc.
>
> I've now fixed the gv-setter issue with commit 62cf8f1649, but I'll
> leave this bug open to track fixes for this class of issues in
> edebug.el, as well as debuggability improvements.
There are a couple similar bugs in Edebug. For example, there's code
to ensure that nested named functions (cl-letf etc.) don't clash with
each other, but that doesn't actually work. For example, edebugging
the definition
(defun foo () (cl-flet ((bar ())) 1))
results in the messages
Edebug: bar
Edebug: foo
which is wrong because "bar" is local, so the symbol should be "foo@bar".
From unknown Sat Jun 21 03:25:33 2025
X-Loop: help-debbugs@gnu.org
Subject: bug#41853: 28.0.50; Peculiar "args out of range" error when using Edebug
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 21 Jun 2020 15:39:01 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41853
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 41853@debbugs.gnu.org
Received: via spool by 41853-submit@debbugs.gnu.org id=B41853.159275393428747
(code B ref 41853); Sun, 21 Jun 2020 15:39:01 +0000
Received: (at 41853) by debbugs.gnu.org; 21 Jun 2020 15:38:54 +0000
Received: from localhost ([127.0.0.1]:60734 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jn23a-0007TZ-0w
for submit@debbugs.gnu.org; Sun, 21 Jun 2020 11:38:54 -0400
Received: from mail-oi1-f174.google.com ([209.85.167.174]:35863)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jn23X-0007TL-Rf
for 41853@debbugs.gnu.org; Sun, 21 Jun 2020 11:38:52 -0400
Received: by mail-oi1-f174.google.com with SMTP id a137so13371529oii.3
for <41853@debbugs.gnu.org>; Sun, 21 Jun 2020 08:38:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=iMWdyuPocNzO3ca8G2n+pEKIyb8dk6PlHNwccIRjWw8=;
b=LoA6MTreP4i8o+t5SDW1qz9rLgx1sS1/nq/vZU6JiWE5AkUh87Jn2Hi1Mt2RA5oErw
n3O4PVZJGuq6w7LgLcS7x3OkuNb/SJhttTusKMztXYzIDyJ4PaReZGxY7MHlHrfJu9Cg
DBcSkNIwRGyK1WFbf23K3jUgR/hjMk2hj0PJVtYJhxZNqzf7DURa5khK7QqTGD6ZExNl
D+oe6IKj0s2bmwD/y8SS2QvILtozsAXdxHi8e3EUa+S6TZm5JJsdNJaCcRilKdxmxU9m
6Epa4IVMS75PDtCXQx+JDK8Xhecv887VWhOPMfpa8clnkrj2h6ayph0PfdTs8IvVOl+5
+Uag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=iMWdyuPocNzO3ca8G2n+pEKIyb8dk6PlHNwccIRjWw8=;
b=SpCcFnkXohkK8NJYKCc9BM4NSIl+Pz9WvWeGr04Y4UUzkCsga5PxVRtqQA3VpLJT36
f/QN4X4vFhZslTNc/sbR3eaRg3+hGJurh2f2zrh+8W9XRqmuxm5i7mFr80pQk3UXJv4+
M2bFqJaBGtX0uu40tHv98Tzx+UJGGFbqhV/PUjojKBS8gjZguTq13CkhsroCcRXDzO/T
ya+m0m/yfgi/NWJgxRs+EErA/pHpSACLpenLiScSwNyghvhkG+IIj7/y0pBXOEAHz7to
U/dTlhOVqnUNrSP7JThzh51Ad09+URqNCWsWVWJd+pHHwkoFMLG9BTHBFhL3PZK0AjTn
JrFg==
X-Gm-Message-State: AOAM532BSEFWOEC5DwD03PamLykaJksfDG3bTdCvmzCFPa1Cg0wvT1Ja
be0QxFmaKiFSoZEDuzwFFGlX9oQ3K2uRxbR2rWepKYNo
X-Google-Smtp-Source: ABdhPJxw8do9bDUmJPCS4c45IZtqJkWjbbz9iR8ic4OOSTI9DrcBJhHkzGau5gdeHvzYjmPvRl10HodN4M75qBgUSkE=
X-Received: by 2002:aca:51ca:: with SMTP id f193mr9712495oib.170.1592753925893;
Sun, 21 Jun 2020 08:38:45 -0700 (PDT)
MIME-Version: 1.0
References:
In-Reply-To:
From: Philipp Stephani
Date: Sun, 21 Jun 2020 17:38:34 +0200
Message-ID:
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.8 (/)
Am So., 21. Juni 2020 um 15:40 Uhr schrieb Philipp Stephani
:
>
> Am So., 14. Juni 2020 um 18:23 Uhr schrieb Philipp Stephani
> :
> >
> > Am So., 14. Juni 2020 um 17:48 Uhr schrieb Philipp Stephani
> > :
> > >
> > > Am So., 14. Juni 2020 um 17:35 Uhr schrieb Philipp Stephani
> > > :
> > > >
> > > > Am So., 14. Juni 2020 um 17:20 Uhr schrieb Philipp Stephani
> > > > :
> > > > >
> > > > > Am So., 14. Juni 2020 um 16:23 Uhr schrieb Philipp Stephani
> > > > > :
> > > > > >
> > > > > >
> > > > > > This error is somewhat common when using `edebug-all-defuns'. It's not
> > > > > > easy to reproduce with a minimal example, but happens in real-world
> > > > > > code. For example, the following recipe works for me consistently:
> > > > > >
> > > > > > 1. Clone the Flycheck repository at commit
> > > > > > c02cd773dded0215f9417ec04dfe8dabda63ef43 (probably most other commits
> > > > > > also work, this is just for reproducibility).
> > > > > >
> > > > > > 2. Clone the dash.el repository at commit
> > > > > > ea4a4cc7cce7c3b93862a22df8bca8b83052ccbf (probably the exact commit
> > > > > > doesn't matter here as well).
> > > > > >
> > > > > > 3. Visit flycheck.el like so:
> > > > > >
> > > > > > emacs -Q -L /src/dash.el/ -l edebug -f edebug-all-defuns \
> > > > > > -f toggle-debug-on-error flycheck.el
> > > > > >
> > > > > > 4. M-x eval-buffer
> > > > > >
> > > > > > 5. Step through macro expansions using the `G' key. Repeat until
> > > > > > `eval-buffer' is complete or has signalled and error.
> > > > > >
> > > > > > 6. At some point, there will be an error
> > > > > >
> > > > > > edebug--display: Args out of range: [66 86 129 138 139], 5
> > > > > >
> > > > > > without invoking the debugger or backtrace.
> > > > > >
> > > > > > This looks like a bug in Edebug.
> > > > > >
> > > > >
> > > > >
> > > > > The immediate trigger appears to be that in `edebug-slow-after' for
> > > > > `flycheck--checker-property-name' the AFTER-INDEX is out of range for
> > > > > the EDEBUG-FREQ-COUNT vector. I still don't understand why though;
> > > > > there must be some part in edebug that misinstruments these forms.
> > > > > The vector [66 86 129 138 139] is likely a vector of offsets, not
> > > > > frequencies; the vector matches the setter for flycheck-checker-get
> > > > > quite well. So maybe there's an issue with how edebug instruments
> > > > > gv-define-setter?
> > > >
> > > > Yup, looks like this is the root of the issue. Minimal example:
> > > >
> > > > $ cat /tmp/a.el
> > > > (defun foo (b) b)
> > > > (defun my-get (a b) (get a (foo b)))
> > > > (gv-define-setter my-get (x a b) `(setf (get ,a (foo ,b)) ,x))
> > > > (push 'foo (my-get 'foo 'bar))
> > > >
> > > > $ emacs -Q -l edebug -f edebug-all-defuns /tmp/a.el
> > > >
> > > > Then run M-x eval-buffer and hit G three times. Error:
> > > > edebug--display: Args out of range: [33 47 55 60 61], 5
> > > >
> > > > Could the problem here be that to find the instrumentation metadata of
> > > > SYMBOL edebug uses (get SYMBOL 'edebug), and that it doesn't detect
> > > > that the setter for `my-get' is a new entity?
> > >
> > > So it looks more and more like the implementation of
> > > `edebug-read-and-maybe-wrap-form1' generally doesn't support this use
> > > case well at all. If the Edebug spec is `(&define name...)', then it
> > > appears to blindly assume that the form being instrumented is the only
> > > form defining NAME. That's clearly incorrect as NAME can mean
> > > different kinds of entities depending on what the defining macro
> > > happens to define.
> > > I guess for `gv-define-setter' we can work around this by adding
> > > `:name gv-setter' to the edebug specification, but the issue should be
> > > fixed (or at least detected) in Edebug more generally. Also debugging
> > > this is extremely hard because there's no backtrace etc.
> >
> > I've now fixed the gv-setter issue with commit 62cf8f1649, but I'll
> > leave this bug open to track fixes for this class of issues in
> > edebug.el, as well as debuggability improvements.
>
> There are a couple similar bugs in Edebug. For example, there's code
> to ensure that nested named functions (cl-letf etc.) don't clash with
> each other, but that doesn't actually work. For example, edebugging
> the definition
> (defun foo () (cl-flet ((bar ())) 1))
> results in the messages
> Edebug: bar
> Edebug: foo
> which is wrong because "bar" is local, so the symbol should be "foo@bar".
However, even that isn't enough because `foo' could contain multiple
non-overlapping definitions of `bar'. So probably this should use a
similar strategy as cl-macrolet, i.e. generate a unique name.