all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* SIGSEGV in treesit_load_language
@ 2022-10-17 17:19 João Paulo Labegalini de Carvalho
  2022-10-17 17:33 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: João Paulo Labegalini de Carvalho @ 2022-10-17 17:19 UTC (permalink / raw)
  To: emacs-devel, casouri

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

Hi,

I configured to build emacs from source -- branch feature/tree-sitter and
commit 02f78c09b0a97ba044a43682a366a9d7732b885d -- invoking configure as
bellow:

../configure --with-json --with-imagemagick --with-x --with-tree-sitter
CFLAGS="-ggdb -O2" --enable-profiling

and build with make -j4. Then  I ran make -j4 check and all tests passed.

If all the forms below are evaluated with M-x eval-region -- after
launching Emacs with emacs -Q, the (*empty file*) /tmp/test.py is opened
but any key press (e.g. RET) kills emacs with SIGSEGV.

(setq python-use-tree-sitter t)

(and python-use-tree-sitter
     (treesit-available-p))

(setq treesit-extra-load-path
"~/emacs-tree-sitter/emacs-devel/admin/notes/tree-sitter/build-module/dist")

(find-file "/tmp/test.py")

Launching  Emacs with GDB and repeating the above steps reveals that the
SIGSEGV happens at:

treesit_load_language (language_symbol=<optimized out>,
signal_symbol=0x7fffffff6f90, signal_data=0x7fffffff6f98) at
../../src/lisp.h:1519
1519  return lisp_h_XCAR (c);

Any idea what I might be doing wrong? I downloaded libtree-sitter-python.so
from here <https://github.com/casouri/tree-sitter-module/releases/tag/v2.1>
and built from source.

-- 
João Paulo L. de Carvalho
Ph.D Computer Science |  IC-UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
joao.carvalho@ic.unicamp.br
joao.carvalho@ualberta.ca

[-- Attachment #2: Type: text/html, Size: 2270 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SIGSEGV in treesit_load_language
  2022-10-17 17:19 SIGSEGV in treesit_load_language João Paulo Labegalini de Carvalho
@ 2022-10-17 17:33 ` Eli Zaretskii
  2022-10-17 17:37   ` João Paulo Labegalini de Carvalho
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-10-17 17:33 UTC (permalink / raw)
  To: João Paulo Labegalini de Carvalho; +Cc: emacs-devel, casouri

> From: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>
> Date: Mon, 17 Oct 2022 11:19:03 -0600
> 
> (setq treesit-extra-load-path "~/emacs-tree-sitter/emacs-devel/admin/notes/tree-sitter/build-module/dist")

The value of this variable should be a list, not a single string.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SIGSEGV in treesit_load_language
  2022-10-17 17:33 ` Eli Zaretskii
@ 2022-10-17 17:37   ` João Paulo Labegalini de Carvalho
  2022-10-17 17:41     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: João Paulo Labegalini de Carvalho @ 2022-10-17 17:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, casouri

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

Thanks for pointing that out , Eli. I missed that comment in M-x
describe-variable RET treesit-extra-load-path.

Would it not be better to generate an error "wrong type of argument"
instead of just causing a SIGSEGV though?

On Mon, Oct 17, 2022 at 11:33 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>
> > Date: Mon, 17 Oct 2022 11:19:03 -0600
> >
> > (setq treesit-extra-load-path
> "~/emacs-tree-sitter/emacs-devel/admin/notes/tree-sitter/build-module/dist")
>
> The value of this variable should be a list, not a single string.
>


-- 
João Paulo L. de Carvalho
Ph.D Computer Science |  IC-UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
joao.carvalho@ic.unicamp.br
joao.carvalho@ualberta.ca

[-- Attachment #2: Type: text/html, Size: 1560 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SIGSEGV in treesit_load_language
  2022-10-17 17:37   ` João Paulo Labegalini de Carvalho
@ 2022-10-17 17:41     ` Eli Zaretskii
  2022-10-17 17:48       ` João Paulo Labegalini de Carvalho
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-10-17 17:41 UTC (permalink / raw)
  To: João Paulo Labegalini de Carvalho; +Cc: emacs-devel, casouri

> From: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>
> Date: Mon, 17 Oct 2022 11:37:51 -0600
> Cc: emacs-devel@gnu.org, casouri@gmail.com
> 
> Would it not be better to generate an error "wrong type of argument" instead of just causing a SIGSEGV
> though?

Already done, please update from Git.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SIGSEGV in treesit_load_language
  2022-10-17 17:41     ` Eli Zaretskii
@ 2022-10-17 17:48       ` João Paulo Labegalini de Carvalho
  0 siblings, 0 replies; 5+ messages in thread
From: João Paulo Labegalini de Carvalho @ 2022-10-17 17:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, casouri

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

Thank you, Eli.

I was trying to figure how to address this, but you were quicker than me.

On Mon, Oct 17, 2022 at 11:42 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>
> > Date: Mon, 17 Oct 2022 11:37:51 -0600
> > Cc: emacs-devel@gnu.org, casouri@gmail.com
> >
> > Would it not be better to generate an error "wrong type of argument"
> instead of just causing a SIGSEGV
> > though?
>
> Already done, please update from Git.
>


-- 
João Paulo L. de Carvalho
Ph.D Computer Science |  IC-UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
joao.carvalho@ic.unicamp.br
joao.carvalho@ualberta.ca

[-- Attachment #2: Type: text/html, Size: 1538 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-17 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 17:19 SIGSEGV in treesit_load_language João Paulo Labegalini de Carvalho
2022-10-17 17:33 ` Eli Zaretskii
2022-10-17 17:37   ` João Paulo Labegalini de Carvalho
2022-10-17 17:41     ` Eli Zaretskii
2022-10-17 17:48       ` João Paulo Labegalini de Carvalho

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.