From: Erik Overdahl <erik.overdahl@gmail.com>
To: 66549@debbugs.gnu.org
Subject: bug#66549: 29.1.50; SIGABRT received parsing file with tree-sitter in PGTK Emacs
Date: Sat, 14 Oct 2023 15:19:46 -0500 [thread overview]
Message-ID: <CA+PiuB73ygT_iEHArcUmuA39_2iaFmFX_X7MHxs6NZT10gCFMw@mail.gmail.com> (raw)
Emacs is receiving a SIGABRT (Fatal Error 6) with error message
~munmap_chunk(): invalid pointer~ when parsing any file with the
tree-sitter-hcl grammar. The crash only occurs when Emacs is built with
PGTK.
I am not sure if this is a bug in the grammar or in Emacs itself. The
fact that the bug only happens with a PGTK build of Emacs leads me to
believe that the bug is within Emacs. However, the crash does not occur
with the ~v1.1.0~ release of the grammar, and so the bug may lay in the
newly rewritten scanner added to the tree-sitter-hcl repo since that
release.
Full instructions for reproducing the crash can be found at
https://github.com/erik-overdahl/emacs-29-pgtk-ts-crash-bugreport
For a quick explanation in this bug report:
Build emacs with ./configure --with-tree-sitter --with-pgtk. Try to
parse any HashiCorp Configuraiton Language (HCL) file with the following
emacs lisp:
(require 'treesit)
(add-to-list 'treesit-language-source-alist
'(hcl .
("https://github.com/MichaHoffmann/tree-sitter-hcl" "main" "src")))
(treesit-install-language-grammar 'hcl)
(with-temp-buffer
(insert-file-contents "example.hcl")
;; `treesit-parser-create' creates a parser for the buffer that is
;; then invoked lazily. Using `treesit-parse-string' to force parse.
(treesit-parse-string (buffer-string) 'hcl))
The result in my Emacs is an immediate crash due to SIGABRT.
I am not including the usual environment information in this report as
I am using Doom Emacs and so the info is a huge amount of irrelevant
noise. Please see
https://github.com/erik-overdahl/emacs-29-pgtk-ts-crash-bugreport for
a minimal environment reproducing this bug.
next reply other threads:[~2023-10-14 20:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-14 20:19 Erik Overdahl [this message]
2023-10-15 5:40 ` bug#66549: 29.1.50; SIGABRT received parsing file with tree-sitter in PGTK Emacs Eli Zaretskii
2023-10-15 18:36 ` Erik Overdahl
2023-10-15 19:12 ` Eli Zaretskii
2023-10-15 20:03 ` Erik Overdahl
2023-10-16 11:29 ` Eli Zaretskii
[not found] ` <CA+PiuB7EfnM9SG6syhNRGBAMvpr3BH_pgbLtdsU2usVpcvXxyw@mail.gmail.com>
2023-10-17 2:29 ` Eli Zaretskii
2023-10-17 21:24 ` Erik Overdahl
2023-10-18 2:30 ` Eli Zaretskii
2023-10-29 11:28 ` Eli Zaretskii
2023-10-15 19:31 ` Erik Overdahl
2023-10-16 11:22 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+PiuB73ygT_iEHArcUmuA39_2iaFmFX_X7MHxs6NZT10gCFMw@mail.gmail.com \
--to=erik.overdahl@gmail.com \
--cc=66549@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).