From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mats cronqvist Newsgroups: gmane.emacs.bugs Subject: bug#46108: 28.0.50; etags segfault Date: Mon, 25 Jan 2021 22:35:42 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000086e3b405b9c0520a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40501"; mail-complaints-to="usenet@ciao.gmane.io" To: 46108@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 25 22:39:12 2021 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 1l49Zn-000APi-8Z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jan 2021 22:39:11 +0100 Original-Received: from localhost ([::1]:54760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l49Zl-0005MD-Nl for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jan 2021 16:39:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l49Ze-0005M4-3l for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2021 16:39:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l49Zd-0003qn-TF for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2021 16:39:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l49Zd-0001rT-Rb for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2021 16:39:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: mats cronqvist Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jan 2021 21:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46108 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16116107327137 (code B ref -1); Mon, 25 Jan 2021 21:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jan 2021 21:38:52 +0000 Original-Received: from localhost ([127.0.0.1]:40213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l49ZT-0001r2-Ge for submit@debbugs.gnu.org; Mon, 25 Jan 2021 16:38:52 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l49Wg-0001mv-5x for submit@debbugs.gnu.org; Mon, 25 Jan 2021 16:35:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l49Wf-00059r-VR for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2021 16:35:58 -0500 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:44467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l49Wd-0003Js-5L for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2021 16:35:57 -0500 Original-Received: by mail-wr1-f43.google.com with SMTP id d16so13783390wro.11 for ; Mon, 25 Jan 2021 13:35:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=uBFmyEQoVCaioxOIU2Swq7Pf2uGTINOhsMzv+UGSM1A=; b=KEh0gkkEMlx+o4DPsAXAGArRuClh9qNtTDZr1elTZvc/IyqSv3r2+j2JBp8dnkrYZY o8kOWuyMB0TZqhP6Xl+F31wVL52FpN7aNl2r5wYtjejdjqCQA4+BJBic+qE5sdaaIQ7e Wn5Qu+IWCahrIb4X5D0EpMbM6zWSmxSSLN2uZPAi1IxN5sgJSKjERA3UlElc46cuLuTA KYHixAcTGuBsUlInZ4PnRkfRkwCIcrPnwOlPHU13XpedZFFtdZElZI5Z2nQ/kTrcdmyX bLTm02V1jB3h6lEGUiG0ByeXW++DCfN7n3mnVgW0t1BzY9gF3plVuxL5s52G/X23e91j gxxA== X-Gm-Message-State: AOAM530c+hvPU2CucesS+gCzk8Nrfxwg6C2EjcUoopcP3S4D/K5tL3FO jCUnTLwTcBJGDL0wM9wj7eMuZ2zMwRqBuhpEAdtJww1oIEel3A== X-Google-Smtp-Source: ABdhPJx2QO+AT0FreX2aw2eBxpjEpYBcRc3lWLLqujwdMxiFlBy1Z1ZNQ7a9TnaNULPHtjbkoSy/cMPAzL+81SakmLo= X-Received: by 2002:adf:e3c2:: with SMTP id k2mr2941309wrm.337.1611610552983; Mon, 25 Jan 2021 13:35:52 -0800 (PST) Received-SPF: pass client-ip=209.85.221.43; envelope-from=mats.cronqvist@gmail.com; helo=mail-wr1-f43.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 25 Jan 2021 16:38:49 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:198590 Archived-At: --00000000000086e3b405b9c0520a Content-Type: text/plain; charset="UTF-8" $ etags ~/f.erl Segmentation fault where f.erl looks like this; $ cat f.erl -module(f). -export([x/0]). x() -> y(). -spec y() -> y. y() -> y. Possibly relevant; with the diff below I can successfully process a few thousand files (including the Erlang standard library). $ git diff diff --git a/lib-src/etags.c b/lib-src/etags.c index 4315771..78db8dc 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -6059,11 +6059,6 @@ Erlang_functions (FILE *inf) else if (cp[0] == '-') /* attribute, e.g. "-define" */ { erlang_attribute (cp); - if (last != NULL) - { - free (last); - last = NULL; - } } else { In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2020-12-18 built on royksopp Repository revision: 3df4ca451d41a5f1036713277ef55ca9734c6fa7 Repository branch: pgtk Windowing system distributor 'System Description: Debian GNU/Linux bullseye/sid Configured using: 'configure --with-pgtk --with-cairo --with-modules --without-makeinfo' Configured features: PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 PGTK XIM MODULES THREADS PDUMPER Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: global-highlight-parentheses-mode: t highlight-parentheses-mode: t global-whitespace-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t global-flycheck-mode: t flycheck-mode: t nyan-mode: t display-time-mode: t delete-selection-mode: t show-paren-mode: t pallet-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail cl-indent cus-edit cus-start cus-load wid-edit mm-archive mule-util gnutls network-stream url-http url-gw nsm url-cache url-auth pulse cl-print eieio-opt speedbar ezimage dframe shortdoc erlang-test ert pp ewoc debug backtrace help-fns radix-tree markdown-mode color noutline outline bazel-mode bazel-util python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp flymake-proc flymake ffap thingatpt xml sh-script smie executable flyspell ispell grep compile misearch multi-isearch erldoc vc-git erlang etags fileloop generator xref project tempo pcase smart-mode-line rich-minority gruvbox-dark-hard-theme gruvbox autothemer highlight-parentheses whitespace magit-submodule magit-obsolete magit-popup magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient format-spec magit-git magit-section magit-utils crm log-edit easy-mmode message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor cl-extra async-bytecomp async shell pcomplete comint ring fdlcap masserlang erlang-start align flycheck ansi-color find-func help-mode nyan-mode server time ido delsel paren pallet advice rx edmacro kmacro warnings cask cask-bootstrap ansi package-recipe-mode package-build-badges package-build package-recipe eieio-compat lisp-mnt shut-up epl git commander f dash s finder-inf info package easymenu browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/pgtk-win pgtk-win term/common-win 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 button loaddefs faces cus-face macroexp files window 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 pgtk multi-tty make-network-process emacs) Memory information: ((conses 16 1670916 286430) (symbols 48 31819 436) (strings 32 247118 34176) (string-bytes 1 8231634) (vectors 16 75961) (vector-slots 8 1518453 81991) (floats 8 378 1831) (intervals 56 203310 13173) (buffers 984 63)) --00000000000086e3b405b9c0520a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=C2=A0=C2=A0

$ etags ~/f.erl
Segmentation= fault

where f.erl looks like this;
$ cat f.erl
-module(f).-export([x/0]).
x() ->
=C2=A0 =C2=A0 y().
-spec y() -> y.y() ->
=C2=A0 =C2=A0 y.

Possibly relevant; with the diff bel= ow I can successfully process a few
thousand files (including the Erlang= standard library).

$ git diff
diff --git a/lib-src/etags.c b/lib= -src/etags.c
index 4315771..78db8dc 100644
--- a/lib-src/etags.c
+= ++ b/lib-src/etags.c
@@ -6059,11 +6059,6 @@ Erlang_functions (FILE *inf)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0else if (cp[0] =3D=3D '-') =C2=A0 /*= attribute, e.g. "-define" */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 erlang_attribute (cp);
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 if (last !=3D NULL)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 free (last);
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 last =3D NULL;
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {




In GN= U Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo = version 1.16.0)
=C2=A0of 2020-12-18 built on royksopp
Repository revi= sion: 3df4ca451d41a5f1036713277ef55ca9734c6fa7
Repository branch: pgtkWindowing system distributor 'System Description: Debian GNU/Linux bu= llseye/sid

Configured using:
=C2=A0'configure --with-pgtk --w= ith-cairo --with-modules --without-makeinfo'

Configured features= :
PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS F= REETYPE
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 PGTK XIM MODULES THREADS = PDUMPER

Important settings:
=C2=A0 value of $LANG: en_US.utf8
= =C2=A0 locale-coding-system: utf-8-unix

Major mode: ELisp/l

M= inor modes in effect:
=C2=A0 global-highlight-parentheses-mode: t
=C2= =A0 highlight-parentheses-mode: t
=C2=A0 global-whitespace-mode: t
= =C2=A0 magit-auto-revert-mode: t
=C2=A0 global-git-commit-mode: t
=C2= =A0 async-bytecomp-package-mode: t
=C2=A0 shell-dirtrack-mode: t
=C2= =A0 global-flycheck-mode: t
=C2=A0 flycheck-mode: t
=C2=A0 nyan-mode:= t
=C2=A0 display-time-mode: t
=C2=A0 delete-selection-mode: t
=C2= =A0 show-paren-mode: t
=C2=A0 pallet-mode: t
=C2=A0 global-eldoc-mode= : t
=C2=A0 eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mou= se-wheel-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-l= ock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
= =C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0= auto-compression-mode: t
=C2=A0 column-number-mode: t
=C2=A0 line-nu= mber-mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
= None found.

Features:
(shadow sort mail-extr emacsbug sendmail cl= -indent cus-edit cus-start cus-load
wid-edit mm-archive mule-util gnutls= network-stream url-http url-gw nsm
url-cache url-auth pulse cl-print ei= eio-opt speedbar ezimage dframe shortdoc
erlang-test ert pp ewoc debug b= acktrace help-fns radix-tree markdown-mode color
noutline outline bazel-= mode bazel-util python tramp-sh tramp tramp-loaddefs
trampver tramp-inte= gration files-x tramp-compat parse-time iso8601 ls-lisp
flymake-proc fly= make ffap thingatpt xml sh-script smie executable flyspell
ispell grep c= ompile misearch multi-isearch erldoc vc-git erlang etags fileloop
genera= tor xref project tempo pcase smart-mode-line rich-minority
gruvbox-dark-= hard-theme gruvbox autothemer highlight-parentheses whitespace
magit-sub= module magit-obsolete magit-popup magit-blame magit-stash magit-reflog
m= agit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
m= agit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge=
magit-branch magit-reset magit-files magit-refs magit-status magit magi= t-repos
magit-apply magit-wip magit-log which-func imenu magit-diff smer= ge-mode diff
diff-mode magit-core magit-autorevert autorevert filenotify= magit-margin
magit-transient magit-process magit-mode git-commit transi= ent format-spec
magit-git magit-section magit-utils crm log-edit easy-mm= ode message rmc puny
dired dired-loaddefs rfc822 mml mml-sec epa derived= epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time= -date mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 m= m-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader = pcvs-util add-log with-editor
cl-extra async-bytecomp async shell pcompl= ete comint ring fdlcap masserlang
erlang-start align flycheck ansi-color= find-func help-mode nyan-mode server
time ido delsel paren pallet advic= e rx edmacro kmacro warnings cask
cask-bootstrap ansi package-recipe-mod= e package-build-badges package-build
package-recipe eieio-compat lisp-mn= t shut-up epl git commander f dash s
finder-inf info package easymenu br= owse-url url url-proxy url-privacy
url-expand url-methods url-history ur= l-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source = cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-= x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs c= l-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-typ= e mwheel term/pgtk-win pgtk-win
term/common-win tool-bar dnd fontset ima= ge regexp-opt fringe tabulated-list
replace newcomment text-mode elisp-m= ode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isear= ch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font= -core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-la= ng misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-= ms cp51932 hebrew greek romanian slovak czech european ethiopic
indian c= yrillic chinese composite charscript charprop case-table epa-hook
jka-cm= pr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs
= faces cus-face macroexp files window text-properties overlay sha1 md5 base6= 4
format env code-pages mule custom widget hashtable-print-readable back= quote
threads dbusbind inotify dynamic-setting system-font-setting
fo= nt-render-setting cairo move-toolbar gtk x-toolkit pgtk multi-tty
make-n= etwork-process emacs)

Memory information:
((conses 16 1670916 286= 430)
=C2=A0(symbols 48 31819 436)
=C2=A0(strings 32 247118 34176)
= =C2=A0(string-bytes 1 8231634)
=C2=A0(vectors 16 75961)
=C2=A0(vector= -slots 8 1518453 81991)
=C2=A0(floats 8 378 1831)
=C2=A0(intervals 56= 203310 13173)
=C2=A0(buffers 984 63))
--00000000000086e3b405b9c0520a--