bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66549: 29.1.50; SIGABRT received parsing file with tree-sitter in PG


From: Erik Overdahl
Subject: bug#66549: 29.1.50; SIGABRT received parsing file with tree-sitter in PGTK Emacs
Date: Tue, 17 Oct 2023 16:24:44 -0500

I have run the commands (adding -fPIC for linux). I can confirm that using the resulting shared object does not crash Emacs. A bit of experimentation reveals that the crash occurs only when the grammar is compiled with -O0. However, despite not crashing, Emacs does not parse the file successfully, although I agree this may be a separate issue. 

On Mon, Oct 16, 2023 at 21:29 Eli Zaretskii <eliz@gnu.org> wrote:
[Please use Reply All when replying to keep the bug tracker CC'ed.]

> From: Erik Overdahl <erik.overdahl@gmail.com>
> Date: Mon, 16 Oct 2023 18:21:26 -0500
>
> > After cloning the repository, I ran the following commands:
> >
> > cd src
> > gcc -O2 -I. -MMD -MF ./parser.d -MP   -c -o parser.o parser.c
> > gcc -O2 -I. -MMD -MF ./scanner.d -MP   -c -o scanner.o scanner.c
> > gcc  -shared parser.o scanner.o  -ltree-sitter -o libtree-sitter-hcl.dll
> >
> > (This is on Windows, thus the .dll extension and no -fPIC compiler
> > switch.)  Your link command line, viz.:
> >
> >  cc -fPIC -shared *.o -o libtree-sitter-hcl.so
> >
> > lacks the -ltree-sitter switch, though, which may or may not be the
> > problem.
>
> If there is a problem with the command I used to build the grammar, then there is a problem with the
> function `treesit-install-language-grammar`, as I copied the commands directly from there. I imagine
> this is how most users would install this grammar?

Maybe there is a problem, but please try compiling using the above
commands, and see if the problem is gone.  We must establish the root
cause before we assign blame or consider where and how to fix the
problem.

So: did the above commands fix the problem for you.

> I have discovered another oddity.

Thanks, but I'm not sure this is related.  I think we should focus on
fixing the crash first.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]