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: Wed, 22 Jun 2022 10:13:08 +0200 Message-ID: <32e548cc-ffd3-4669-ad9a-317c130b0c93@Spark> References: <83mte7kv7c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="62b2cf1a_98a3148_588f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16617"; 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 Wed Jun 22 10:14:12 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 1o3vV6-00047x-F0 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jun 2022 10:14:12 +0200 Original-Received: from localhost ([::1]:53882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3vV5-0001e5-BN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jun 2022 04:14:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3vUy-0001dU-DT for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2022 04:14:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3vUw-0005Se-4o for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2022 04:14:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o3vUv-0000XR-VO for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2022 04:14:01 -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: Wed, 22 Jun 2022 08:14: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.16558856052006 (code B ref 56108); Wed, 22 Jun 2022 08:14:01 +0000 Original-Received: (at 56108) by debbugs.gnu.org; 22 Jun 2022 08:13:25 +0000 Original-Received: from localhost ([127.0.0.1]:33915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3vUL-0000WI-Eq for submit@debbugs.gnu.org; Wed, 22 Jun 2022 04:13:25 -0400 Original-Received: from mail-ej1-f45.google.com ([209.85.218.45]:33713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3vUH-0000W3-7u for 56108@debbugs.gnu.org; Wed, 22 Jun 2022 04:13:24 -0400 Original-Received: by mail-ej1-f45.google.com with SMTP id mf9so12176943ejb.0 for <56108@debbugs.gnu.org>; Wed, 22 Jun 2022 01:13:21 -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=NbDfP7+0ZkMmD4Bj400MLCbyIO9yL2gFdt3r/kwt2CQ=; b=FGcndnDFXGgQMc2yZBvnqYV6TORaxUXpq1ZLn8xkGv5En503mhnbJNNyoWwLjlOrl4 H9V0Rpc6QN9a8L08WiavLVOlteqTJ0G1R+UdcVpf4d7k+ZBmQmrOUuRVUT864bnPkx8W qKcaWYdgsxOuVCub9HniIfwbE6hNqkXIEuSQKk97pmhGMOdyV6DoA+ft5X5zwyDqJZhH GM66jgCo0iSdWgXOz9wCuTFDtVt7//8u9/nDzCPVHPdH5ZHIFxuoGsGDsKDU4y4pxmAX fhpUd4v451FppCIQWCB7Iu38Cx5gg6W7aNTZJzNChgjwdASfjTqnqR/h5bkGErbxbMaG qWeQ== 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=NbDfP7+0ZkMmD4Bj400MLCbyIO9yL2gFdt3r/kwt2CQ=; b=gFNkQWMCcLcDLdYgPib0KJOxaSbiktzbIxT78ilGTgXsv+/zCDLmK6bvbzDiIuZRQ+ 2wGbUKeV21EuGHE++66Hxh54L0z+YC0w8Fj9Y2jo0reG7VZrkTUdqYFET7ybJPuysjzG DhufLTfg15kKhjBgwj8ZP5iHSVn2BpIAcPyQnWs73iIRZbX4pyM3AjlzgcP6v5Aj5cs0 95Z0lFVL91T0ym11Kjutki2gAWrGzyPyck8OK7nxmMTM+JcTkOOHi6TiukS3yo2wfwIa O/HrvQDB3MSjrejPnMthU3KAFhS0FMMPS6OQEzRGQbDGPMWHaCwdCBKIPjkjqcf/ieYZ bFGg== X-Gm-Message-State: AJIora9EO0/EjdFT9stajY8s/dAIOiKZG347kWG5AKbPUjLp1gO/QEU9 Ms9M/ati4c0ZvmM37gHqXb3rZ/h30lHiVg== X-Google-Smtp-Source: AGRyM1vNgOssff2KHkA1+Yne+O++oprSVIin0uzCEvaXCjDdy1KRTjlMipkx7vTYgKn/6PRGuQTNOg== X-Received: by 2002:a17:907:629a:b0:6ff:8cd8:2192 with SMTP id nd26-20020a170907629a00b006ff8cd82192mr1945452ejc.30.1655885595149; Wed, 22 Jun 2022 01:13:15 -0700 (PDT) Original-Received: from [192.168.178.21] (pd9e3676b.dip0.t-ipconnect.de. [217.227.103.107]) by smtp.gmail.com with ESMTPSA id ky22-20020a170907779600b00705cd37fd5asm8808650ejc.72.2022.06.22.01.13.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jun 2022 01:13:14 -0700 (PDT) In-Reply-To: <83mte7kv7c.fsf@gnu.org> X-Readdle-Message-ID: 32e548cc-ffd3-4669-ad9a-317c130b0c93@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:235008 Archived-At: --62b2cf1a_98a3148_588f Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 20. Jun 2022, 21:10 +0200, Eli Zaretskii , wrote: > > I don't understand why some callers of compile_pattern mark the cache > > entry as busy, but some others don't. If a cache entry that is in use > > is not marked as busy, then any GC can decide to shrink the cache by > > freeing that entry. struct re_pattern_buffer *bufp; ... bufp = &compile_pattern (regexp, ... The address operator is there to confuse the Russians. --62b2cf1a_98a3148_588f Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On 20. Jun 2022, 21:10 +0200, Eli Zaretskii <eli= z=40gnu.org>, wrote:
I don't understand why some callers of compile=5Fpattern mark the cache<= br /> entry as busy, but some others don't. If a cache entry that is in use
is not marked as busy, then any GC can decide to shrink the cache by
freeing that entry.
struct re=5Fpa= ttern=5Fbuffer *bufp;
...
bufp =3D &compile=5Fpattern (reg= exp,
...

The address operator is there to confuse the Russians.
--62b2cf1a_98a3148_588f--