From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= Newsgroups: gmane.emacs.devel Subject: SIGSEGV in treesit_load_language Date: Mon, 17 Oct 2022 11:19:03 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bf1e9005eb3e2c04" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2137"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org, casouri@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 17 19:20:52 2022 Return-path: Envelope-to: ged-emacs-devel@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 1okTnI-0000Nd-16 for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Oct 2022 19:20:52 +0200 Original-Received: from localhost ([::1]:45570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okTnG-0001DN-LU for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Oct 2022 13:20:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okTlm-0000N4-EF for emacs-devel@gnu.org; Mon, 17 Oct 2022 13:19:20 -0400 Original-Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]:37477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okTlk-0008EW-J3 for emacs-devel@gnu.org; Mon, 17 Oct 2022 13:19:18 -0400 Original-Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-12c8312131fso14023596fac.4 for ; Mon, 17 Oct 2022 10:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=vV5tqbiYOSFc7EHjajUMiqL1MN+SHDmudYMI7YscTtM=; b=KTL6KYVSj104bkCUUNklAK0qQf8i1RdW9o2D7LgxBIcetb7YY/l+DooDYcHFC5sjOK ztgjvchiSBAppwtRep6//avZ6QYiYsggR3QoSHP7ETcB3052E+CgBFJD6d1AJe5zjAGt aDF6eztrBrnuj8u8q6F6HeTHESK0nXaIsi0YYSgL5emib1377W6P+PtnLpMPEWLZ7Mv0 4dFgN7Q1zCVW+DcKrrGHMa5Dls1fiNPxmLnTP1YHFQrMmY7Eq8OhEtqUYtkt6weby8Q/ uOCC9pqlsV78+aJRS2ytKEuGYZYpqgCbZnD+yjbEikA/NhUE3sb6vnyHF+r6ONrBTyKI Pt/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vV5tqbiYOSFc7EHjajUMiqL1MN+SHDmudYMI7YscTtM=; b=rJvLH4OE+TrLxdKtGXt66V+gWzBCPoSuDwL/of+SLUjc+o5U5kklCTDxrzlMxj7rnZ iQA4UQzbMuQbVx/3RV2VVOhUuN7xCQjsA+zgw31dDiyDhK5jnNwaYt9zurtBx+2ATTsJ GaNpEMl4v2vPD4ujnwAm9sOmeAp1p9HcUiG0UbvBuiMB9VH75DhYW9YO91WV2GhIM7tf rODp3sBPPetyGt8QRAJDpoXN23M/ySUTLpNS91gBY+YYAF5sGe4BX6ev47HE2JdD4Kwr WMX14XIVqKwdPUb7dL86Y8I4x4ZE13bXeulOZzwSpxt+4KC29AJmFVaTkdbYS/tyMTqU zd9w== X-Gm-Message-State: ACrzQf3UrdZ+weZxtEh3IoIuu8QoeR3gepkX3sAVWcdM01j4S6dcgJm6 HAAyMfg95fNKAG5U2k8no9RR14+nm6KD3dOHCLhmwyehPo8= X-Google-Smtp-Source: AMsMyM5WYsAi/svNXl2+lYWOkhO4Rzfw/Ifezd2dmnSiGb1Psj0U3xwa+99XxsKIbC9Yuqtehm35x1R9ht+eXS9fE6E= X-Received: by 2002:a05:6870:d1d0:b0:12c:cfd2:8285 with SMTP id b16-20020a056870d1d000b0012ccfd28285mr6402392oac.105.1666027154773; Mon, 17 Oct 2022 10:19:14 -0700 (PDT) Received-SPF: pass client-ip=2001:4860:4864:20::29; envelope-from=jaopaulolc@gmail.com; helo=mail-oa1-x29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297970 Archived-At: --000000000000bf1e9005eb3e2c04 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3D"-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=3D, signal_symbol=3D0x7fffffff6f90, signal_data=3D0x7fffffff6f98) 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 and built from source. --=20 Jo=C3=A3o Paulo L. de Carvalho Ph.D Computer Science | IC-UNICAMP | Campinas , SP - Brazil Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canad= a joao.carvalho@ic.unicamp.br joao.carvalho@ualberta.ca --000000000000bf1e9005eb3e2c04 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I configured to build emacs from source -- bran= ch feature/tree-sitter and commit=C2=A002f78c09b0a97ba044a43682a366a9d7732b= 885d -- invoking configure as bellow:

../co= nfigure --with-json --with-imagemagick --with-x --with-tree-sitter CFLAGS= =3D"-ggdb -O2" --enable-profiling

and build with make -j4. Then=C2=A0 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<= /font>, the (empty file) /tmp/test.p= y is opened but any key press (e.g. RET) kills emacs with SIGSEGV.

(setq python-use-tree-sitter t)

(and python-use-= tree-sitter
=C2=A0 =C2=A0 =C2=A0(treesit-available-p))

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

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

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

trees= it_load_language (language_symbol=3D<optimized out>, signal_symbol=3D= 0x7fffffff6f90, signal_data=3D0x7fffffff6f98) at ../../src/lisp.h:1519
1= 519 =C2=A0return lisp_h_XCAR (c);

Any idea what I might be d= oing wrong? I downloaded libtree-sitter-python.so<= /font> from here and built from source.

--
Jo=C3=A3o Paulo L. de Carvalho
= Ph.D Computer Science | =C2=A0IC-UNICAMP | Campinas , SP - Brazil
Postdo= ctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
--000000000000bf1e9005eb3e2c04--