From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56108: 29.0.50; ASAN use-after-free in re_match_2_internal Date: Thu, 23 Jun 2022 11:37:55 +0300 Message-ID: <83v8srepwc.fsf@gnu.org> References: <83mte7kv7c.fsf@gnu.org> <32e548cc-ffd3-4669-ad9a-317c130b0c93@Spark> <83a6a4kec0.fsf@gnu.org> <6e56407a-b564-4aa9-b74c-78883727ef09@Spark> <831qvgkc8d.fsf@gnu.org> <83sfnwisbb.fsf@gnu.org> <3146c990-63d9-4aa5-ab78-7bae2b7d6cd5@Spark> <835ykrg93i.fsf@gnu.org> <84b39f74-b1dd-4485-b501-fc4a7e634455@Spark> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31111"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56108@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 10:39:13 2022 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 1o4IMr-0007yb-4b for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 10:39:13 +0200 Original-Received: from localhost ([::1]:56476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4IMp-0001Yp-Td for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 04:39:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4IMg-0001XD-1w for bug-gnu-emacs@gnu.org; Thu, 23 Jun 2022 04:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43385) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4IMf-0005xN-Om for bug-gnu-emacs@gnu.org; Thu, 23 Jun 2022 04:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4IMf-0003En-L7 for bug-gnu-emacs@gnu.org; Thu, 23 Jun 2022 04:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jun 2022 08:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56108 X-GNU-PR-Package: emacs Original-Received: via spool by 56108-submit@debbugs.gnu.org id=B56108.165597349112384 (code B ref 56108); Thu, 23 Jun 2022 08:39:01 +0000 Original-Received: (at 56108) by debbugs.gnu.org; 23 Jun 2022 08:38:11 +0000 Original-Received: from localhost ([127.0.0.1]:37282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4ILq-0003Dg-Qc for submit@debbugs.gnu.org; Thu, 23 Jun 2022 04:38:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4ILp-0003DR-Ui for 56108@debbugs.gnu.org; Thu, 23 Jun 2022 04:38:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38872) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4ILk-0005s4-LU; Thu, 23 Jun 2022 04:38:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=30E3Ee8h/Qlfr4En3aYGZ7EP9EpyZ2asThiempoFDdA=; b=Agk2rEMujFstw4STKQUA xllodeCXQf2LSVzVyonx6BuYYktp3dfJ9HGUotdGWpNFf31jvn/i5Wqh8HSmJeLcKnXFtGa4Qzon5 ItamGHc8w1Cs5hw9fkabHK5QnDseDdm+gz3S7iozR4bIrK3EIMG9XzvXocdYH90dSNCp7Q0EShmVk Y/ZzJjM76elj/2OIaXFmU4mi43qHKyTMDbqqswv7IaUC8OQ4GnajUeWixy8PwHutVzONhtiyhz+qY 4UgKapo3bg5NbNh6R8mjuprzkleGUDco3/cLdWWHbwu6+i8WGL5/qvnb/7gRYgxrb4v02DL7yVFFw hBI+HQSHjrWU8g==; Original-Received: from [87.69.77.57] (port=3500 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4ILj-0001Oi-04; Thu, 23 Jun 2022 04:38:03 -0400 In-Reply-To: <84b39f74-b1dd-4485-b501-fc4a7e634455@Spark> (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Thu, 23 Jun 2022 10:24:31 +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" Xref: news.gmane.io gmane.emacs.bugs:235082 Archived-At: > Date: Thu, 23 Jun 2022 10:24:31 +0200 > From: Gerd Möllmann > Cc: 56108@debbugs.gnu.org > > Another side question, if I may: Have you perhaps heard of someone producing a static call graph for > Emacs, or better yet, specific functions in Emacs? Maybe using objdump -D or something > similar? > > Does this make sense in a dynamic program such as Emacs? We call into > Lisp quite a lot from C, and from there you can arrive anywhere, no? > And objdump cannot capture Lisp levels. > > True, but for GC at least, I think it would make it easier to tell if it can potentially happen. One would see a > call to GC in the static call graph. Not for arbitrary lines, of course, you know what I mean... Fair enough. But for that purpose, we need to consider each call into Lisp, either directly or via a hook, as potentially triggering GC. Moreover, if some code can signal an error or throw to a higher level, that could cause GC via the handlers installed by the various unwind-protect forms. So signaling/throwing are also GC triggers, at least in some situations, and I'm not sure how relevant that is to what you had in mind. (People also tend to forget that GC doesn't only deletes "garbage" objects, it also has other potentially "surprising" effects: it can compact strings, relocate string data and buffer text, shrink regexp pattern cache and font caches, etc.)