From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60237: 30.0.50; tree sitter core dumps when I edebug view a node Date: Tue, 28 Feb 2023 23:07:47 -0500 Message-ID: References: <9FCDA5B7-D216-45B1-8051-35B05633BEFB@gmail.com> <83sfeukwsb.fsf@gnu.org> <574817C4-3FD8-43EA-B53C-B2BCB60A6D0A@gmail.com> <83mt51j6mv.fsf@gnu.org> <83a60xhou5.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18742"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: luangruo@yahoo.com, casouri@gmail.com, mickey@masteringemacs.org, 60237@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 01 05:08:26 2023 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 1pXDlS-0004gD-0y for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Mar 2023 05:08:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXDl5-0007rQ-P2; Tue, 28 Feb 2023 23:08:03 -0500 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 1pXDl4-0007r2-Ix for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 23:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXDl4-0002ei-8h for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 23:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXDl3-00075I-Rn for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 23:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Mar 2023 04:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60237 X-GNU-PR-Package: emacs Original-Received: via spool by 60237-submit@debbugs.gnu.org id=B60237.167764367827220 (code B ref 60237); Wed, 01 Mar 2023 04:08:01 +0000 Original-Received: (at 60237) by debbugs.gnu.org; 1 Mar 2023 04:07:58 +0000 Original-Received: from localhost ([127.0.0.1]:52373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXDkz-00074y-N3 for submit@debbugs.gnu.org; Tue, 28 Feb 2023 23:07:58 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXDky-00074h-0p for 60237@debbugs.gnu.org; Tue, 28 Feb 2023 23:07:56 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 43D3D80223; Tue, 28 Feb 2023 23:07:50 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CA4768001C; Tue, 28 Feb 2023 23:07:48 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1677643668; bh=3qGlCunLQrXpHSAtdlhKBRKlX6+EuZybAPM+5CjzkVs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WWYG8S9d4X7RVxO44eiUwwYLrVw8XZ4k1RIuLBiqbaw3jrP6JkMHTavs8wuRCq3ng NsMS/I9zqtIvyqNidMTrz81NG8b47GBEkPCUR170o4/glsmbw904JxFe1zuP3FlyF9 9PcEIf8szNfTa0ZwmH84Jmfih4PYBzS1PbTmQFI7sXZ/zvnOMAUTcxJV70saocsLQ+ N210Dej9ttDC+n8gsA6pqb4YNv3ww9GjUXdddtkBhfUhwNEfmq2JI/of5d9oLehs7/ NKzaPAUuArB5Oji7brGPnIQEZ5oUYuLUvZv89Ot/+JvtFbjj6gfMb5W78YFVXhPeHv RXm0lNHYddr0w== Original-Received: from pastel (unknown [216.154.34.24]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 83548121071; Tue, 28 Feb 2023 23:07:48 -0500 (EST) In-Reply-To: <83a60xhou5.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 28 Feb 2023 16:00:34 +0200") 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:257029 Archived-At: >> > Stefan, could it be a problem for us if garbage-collecting an object >> > calls xmalloc? Including if the "memory" profiler is running at the >> > time of that GC? >> >> I can't think of a fundamental reason why this would be a problem, but >> as you've seen some code may not be quite ready for it. >> >> I suspect the simplest solution is to do something like what we do >> for the cpu-profiler, i.e. handle the "time within GC" specially by >> checking (EQ (backtrace_top_function (), QAutomatic_GC)) to determine >> that we're within the GC. > > Any reason not to install the patch that uses gcsize instead of ASIZE? That might work, but I suspect there's a good reason why I used `cpu_gc_count`. I think running the "normal" profiling code during GC can cause other problems than just ASIZE because it can/will change ELisp objects, and modifying the heap while we're doing GC is the problem that concurrent GCs try to solve: our GC is not equipped for that. Stefan