From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#72863: 30.0.50; tree-sitter elixir-ts-mode hangs and memory leak on some elixir and heex code Date: Thu, 12 Sep 2024 00:47:36 -0700 Message-ID: <6E186236-8610-4240-9441-0CAA666FB03F@gmail.com> References: <94F9A716-7D86-42F9-A010-54501ACF9AF8@ssbb.me> <861q27hq4a.fsf@gnu.org> <0F8C0C10-A357-464F-9863-DED85B80D6C8@ssbb.me> <9B6747A4-4959-464C-82C2-3B58B2C04266@gmail.com> <6B5BA7D6-743D-4B12-903B-2852423A3C00@gmail.com> <86seuawv0c.fsf@gnu.org> <3C53EF6A-EFFA-4648-9741-D7ECAB68F227@gmail.com> <86le02wrts.fsf@gnu.org> <32ED815A-70FE-44BB-96E1-A0B1FEA88C43@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27601"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Wilhelm Kirschbaum , Eli Zaretskii , 72863@debbugs.gnu.org To: mail@ssbb.me Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 12 09:50:49 2024 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 1soebI-0006uV-Mt for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Sep 2024 09:50:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soeap-0006Nj-3T; Thu, 12 Sep 2024 03:50:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1soeaS-0005E9-3t for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 03:49:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soeaR-0002Im-Pe for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 03:49:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=FQAPguVKtMh4s9nvzp+1v7AJTv1CtPEFKkdVqT3jIIg=; b=gdhHLri/u5i7EWf5cam3nuHCJHwldT3Yjfccz0wc6kFI1S5xT8VcaNA/y0LCO/JkDVqHqAMG5jSfJkiq54iYTE6VNOEHKXRvipUli7F4F5v2rPCqV1rbmEFa0Sazmlw9CheU0oC52K+JCXGtqOvU9fHjp6W0gH5P71po9sCwhuFTT1uC2Nh3w3OgtJVOiJugYek2kJ3KYBXlb7s1xH/IsOD/d2cmLBjZcz1S4ErsOb9zH51pkRweSeZxgQkMo86x0KZ1GSo0eq/3NW/foSfy87GdLPZQPlSqQ05Xlh8m3UdV4PBA8yYGMQZMdhQ7RIC/qF75nO8VYvQHXjSxu+Mt7A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1soeaX-0000Yj-QR for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 03:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Sep 2024 07:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72863 X-GNU-PR-Package: emacs Original-Received: via spool by 72863-submit@debbugs.gnu.org id=B72863.17261273452068 (code B ref 72863); Thu, 12 Sep 2024 07:50:01 +0000 Original-Received: (at 72863) by debbugs.gnu.org; 12 Sep 2024 07:49:05 +0000 Original-Received: from localhost ([127.0.0.1]:40047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soeZd-0000XI-3Y for submit@debbugs.gnu.org; Thu, 12 Sep 2024 03:49:05 -0400 Original-Received: from mail-pl1-f179.google.com ([209.85.214.179]:57848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soeZZ-0000Wl-TN for 72863@debbugs.gnu.org; Thu, 12 Sep 2024 03:49:03 -0400 Original-Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-206f9b872b2so7374745ad.3 for <72863@debbugs.gnu.org>; Thu, 12 Sep 2024 00:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726127268; x=1726732068; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FQAPguVKtMh4s9nvzp+1v7AJTv1CtPEFKkdVqT3jIIg=; b=iu+b3yKT0ChAUQrH6Nz9gVLtdBkz70tZ9JD4awnNbLYIO++U3t+IsozQ4TAkByWCQ6 XDCVGeBmO9Tf1rtJQO3iaspn6LhoRDWEdQNmN8rLY4TJWNqZNCZajlzvhUAOVy4hSjmt nvwLN9ltEts79HjvB5yyQIgMXeo7aa2wNlhbhyEtShMiLudFb17oOXdDWPXNrRQK2VwA U4GzVE+TC4o9lOncccOja+UsAxDBfHBsIp7VqQUd2/fROXhHJINX4qMpdjUTZ7JXB1Z0 FYSY4bgRb6FZ+iEqWp4vbqLT3e06rX/9JfCC0WfPYolOJ0xzDR17gXKMAX/5i1NO0jTl sBfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726127268; x=1726732068; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FQAPguVKtMh4s9nvzp+1v7AJTv1CtPEFKkdVqT3jIIg=; b=FOFYGGSsFYkoYokETNFKkz2auFw352r+2GkDnmomF5Lpi4gTn8zVwWWQMoLcUXAW1z 9w7iQkH3jbjpYT7OwFId9CEPFCb2vROYjgtMJaHpOUS02DO3JL4VZedEEENMNkgJLiTa 3ZTTJk8BuHw01tY7wg7G0pspFTaa2Zc2bgSVVGF0bc0SUFOvzrX/RN2/VzVaWiIh159P 5MYqCymy0j37bLWwukUzRWDBeVWtSkicV9fPz5WaF1AZbU7xS1i2J1ddP9Mar3BI7Egh 7Sdc1OqdAbls9Z7JYSmk4kEYkbyEJgmhspMBSWZi2RvPZwAzl/3/8w15Ep4/tJZq2Uz8 oQZg== X-Forwarded-Encrypted: i=1; AJvYcCV9DMtPaZhjERkpT5PuOVmP4jdfjGlT3BQd9LJDdLq6q3ARw7Y0tCz/gT9c3jgHwX4TxJZfDg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yzp37gMu5VBVZlYlVgY8tXohUkydLCGMzA0ky0CpD9y1/NiWZSY KUAnfcNsQKN1BfKcBaJSNUdE9GCO2LOz56y4fJWFaenuSTYF+nMD X-Google-Smtp-Source: AGHT+IF9A0bBhsPeBCbr9J5NayXfhLakEduB3E17QEruABY+1rkk9Qop9lTolddJm2r0tgS4Zl7DUQ== X-Received: by 2002:a17:902:ea08:b0:207:13a3:a896 with SMTP id d9443c01a7336-2076e3c43dfmr30082055ad.23.1726127268182; Thu, 12 Sep 2024 00:47:48 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:5922:91:f01d:e306]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2076b01a7f4sm9608655ad.269.2024.09.12.00.47.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2024 00:47:47 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3776.700.51) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291621 Archived-At: > On Sep 11, 2024, at 12:22=E2=80=AFPM, mail@ssbb.me wrote: >=20 > Wow, thank you so much for diving into this issue! I'll keep track of = it in tree-sitter repo from now on. My pleasure ;-) > It seems like other integrations somehow manage to avoid hanging or = crashing the main process, so it doesn't affect them? > I just checked in the Zed editor again to confirm. When I type a=3D{, = it fails to highlight the rest of the embedded HEEX (but only within the = current function) though. I know a couple editors uses async parsing, Zed probably also uses async = parsing. Yuan >> On Sep 11, 2024, at 7:45=E2=80=AFAM, Yuan Fu = wrote: >>=20 >>=20 >>=20 >>> On Sep 8, 2024, at 12:48=E2=80=AFAM, Yuan Fu = wrote: >>>=20 >>>=20 >>>=20 >>>> On Sep 8, 2024, at 12:02=E2=80=AFAM, Eli Zaretskii = wrote: >>>>=20 >>>>> From: Yuan Fu >>>>> Date: Sat, 7 Sep 2024 22:57:29 -0700 >>>>> Cc: mail@ssbb.me, >>>>> wkirschbaum@gmail.com, >>>>> 72863@debbugs.gnu.org >>>>>=20 >>>>>=20 >>>>>=20 >>>>>> On Sep 7, 2024, at 10:54=E2=80=AFPM, Eli Zaretskii = wrote: >>>>>>=20 >>>>>>> From: Yuan Fu >>>>>>> Date: Sat, 7 Sep 2024 22:44:53 -0700 >>>>>>> Cc: Wilhelm Kirschbaum , >>>>>>> Eli Zaretskii , >>>>>>> 72863@debbugs.gnu.org >>>>>>>=20 >>>>>>> Meanwhile, I want to push the fix for the other bug I discovered = to emacs-30. Eli, I wrote a debugging function that prints parser = states, naturally this function isn=E2=80=99t called anywhere so = there=E2=80=99ll be a compiler warning, what should I do in this case? >>>>>>=20 >>>>>> Why would there be a compiler warning? What kind of warning? >>>>>=20 >>>>> A function-not-used warning. Maybe it=E2=80=99s an lldb thing? >>>>=20 >>>> If the function is not static, there should be no such warning. >>>=20 >>> Ah, you=E2=80=99re right, I marked it static. Thanks! >>>=20 >>> Yuan >>=20 >> Good news: not an Emacs bug. Bad news: a tree-sitter bug. Turns out I = made an error in my test program, which is the reason why Emacs hangs = but the test program doesn=E2=80=99t. Once I fixed the error, the test = program hangs too. I submitted a bug report to tree-sitter: = https://github.com/tree-sitter/tree-sitter/issues/3620 >>=20 >> I can finally sleep soundly at night now; and I guess tree-sitter dev = will start having sleepless nights :-) >>=20 >> Yuan >>=20 >=20