From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#56108: 29.0.50; ASAN use-after-free in re_match_2_internal Date: Thu, 23 Jun 2022 10:49:39 +0200 Message-ID: <215a524f-0580-413b-9b91-68e35708e97d@Spark> 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> <83v8srepwc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="62b42929_4a9554fe_588f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24302"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56108@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 10:53:47 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 1o4Iaw-00065P-Jv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 10:53:46 +0200 Original-Received: from localhost ([::1]:44250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4Iav-0004PU-0w for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 04:53:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4IXK-0001lT-Er for bug-gnu-emacs@gnu.org; Thu, 23 Jun 2022 04:50:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4IXK-0007OM-6p for bug-gnu-emacs@gnu.org; Thu, 23 Jun 2022 04:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4IXK-0003Yj-2M for bug-gnu-emacs@gnu.org; Thu, 23 Jun 2022 04:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jun 2022 08:50:02 +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.165597420013669 (code B ref 56108); Thu, 23 Jun 2022 08:50:02 +0000 Original-Received: (at 56108) by debbugs.gnu.org; 23 Jun 2022 08:50:00 +0000 Original-Received: from localhost ([127.0.0.1]:37305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4IXH-0003YO-Is for submit@debbugs.gnu.org; Thu, 23 Jun 2022 04:49:59 -0400 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:44636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4IXA-0003Y4-U8 for 56108@debbugs.gnu.org; Thu, 23 Jun 2022 04:49:57 -0400 Original-Received: by mail-ej1-f49.google.com with SMTP id sb34so10499899ejc.11 for <56108@debbugs.gnu.org>; Thu, 23 Jun 2022 01:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version; bh=A5K9WLBsJJ1Uvux591pMrvD2NEZrjq7Bk4tgRpMLhFY=; b=DT9AfkiGKEK4Gqx1khIBphXUc2bj0KTmC+7fwjfMCcbrl9aH+n48Xk2QYszpXIbsly +cuH4itK8aNZbIxHLcXQU2ZYYsu4w+dGe6bh9jUe5lyqHhhDLFDO2H4nk1sgUBlu75yv 4wu0pyzBIlOyBPsDZFIS6ZgKTNxTU/lSXm2S2SXYt0dT/Pn7V5c/zIUEACIAxd9t4gAh WSBvHEi6ZOvOhTK/h8uczlmNiPg4uqOfdFiTuKoUwEeqhLopBtQ+4bmoujANhftvE15e mEtnIT1pu+rabgJIzkkW1Eh58FdbSotfILaEt8ADBHdjXMeIr87YWEavFvjZH+N7IPVD R1UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version; bh=A5K9WLBsJJ1Uvux591pMrvD2NEZrjq7Bk4tgRpMLhFY=; b=xPeNFeaQWVX0HQR888D9ZRLGpdW1/Gzuim9bd9SD/kJTUBpT7+TpcMRebTiQr/JDah Jvhe/82Q430jnHJByZQSrU73Kj+hJzKGZ9KLpgdN3oedd67owLCOs82BeBJusi2Flv2C V+346UhAsxVQ57waiPqSMY5C3PAxf9UinqAzzGUlb3grpVfOD+ozGybXFkUI7HVpY91l RBdgUkUeU9FLZ4BWwrkqjcykPe9aJiaN+M2pULlLjV5pJztF0DYuC/wMk9GaJ9ka3NDZ 00fDjsM/6jfSOS44obc82/QiQZu8uMq/46DQXzobadD1OrsiHUOMtKBoc98U+R0qhTsR mxxw== X-Gm-Message-State: AJIora/nsJck7f0Nt+4AZQhsOaII4KE2lRMsmQwe0nwb2epLFigBro/0 PShvnKBkzYGilfg9r01Lxe3Iw4hkSyczpnE9 X-Google-Smtp-Source: AGRyM1uUJPthEK6O6V0S3XV0CnwpPLdkj306aenOaOvux9K3OxNV1GvKBZNjEcyjT5RkkddvbtSoIg== X-Received: by 2002:a17:907:c20e:b0:710:7a7a:fd85 with SMTP id ti14-20020a170907c20e00b007107a7afd85mr6948527ejc.346.1655974186683; Thu, 23 Jun 2022 01:49:46 -0700 (PDT) Original-Received: from [192.168.178.21] (pd9e367fb.dip0.t-ipconnect.de. [217.227.103.251]) by smtp.gmail.com with ESMTPSA id g13-20020a170906538d00b00722e1635531sm4245133ejo.193.2022.06.23.01.49.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2022 01:49:46 -0700 (PDT) In-Reply-To: <83v8srepwc.fsf@gnu.org> X-Readdle-Message-ID: 215a524f-0580-413b-9b91-68e35708e97d@Spark 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:235086 Archived-At: --62b42929_4a9554fe_588f Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 23. Jun 2022, 10:38 +0200, Eli Zaretskii , wrote: > > =46air enough. But for that purpose, we need to consider each call in= to > > Lisp, either directly or via a hook, as potentially triggering GC. > > True. > > > > 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. > > Also true. I don't have something specific in mind, but I might give it a spin, part= ly because I tend to forget which things can call Lisp (like maybe=5Fquit= ), partly because it was so boring to follow the calls in this bug, and p= artly because I can, or could=C2=A0=C2=A0;-). > > > > (People also tend to forget that GC doesn't only deletes =22garbage=22= > > objects, it also has other potentially =22surprising=22 effects: it c= an > > compact strings, relocate string data and buffer text, shrink regexp > > pattern cache and font caches, etc.) Yeah.=C2=A0 =C2=A0ISTR some fun after I changed the Lisp string implement= ation for conservative GC. --62b42929_4a9554fe_588f Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On 23. Jun 2022, 10:38 +0200, Eli Zaretskii <eli= z=40gnu.org>, wrote:
=46air enough. But for that purpose, we need to consider each call into<= br /> Lisp, either directly or via a hook, as potentially triggering GC.

True.

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.

Also true.&=23160;

I don't have something specific in mind, but I might give it a spin, part= ly because I tend to forget which things can call Lisp (like maybe=5Fquit= ), partly because it was so boring to follow the calls in this bug, and p= artly because I can, or could&=23160;&=23160;;-).

(People also tend to forget that GC doesn't only deletes =22garbage=22 objects, it also has other potentially =22surprising=22 effects: it can compact strings, relocate string data and buffer text, shrink regexp
pattern cache and font caches, etc.)
Yeah.&=23160; &=23160;ISTR some fun after I changed= the Lisp string implementation for conservative GC.
--62b42929_4a9554fe_588f--