From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#40661: Crash in regex search during redisplay Date: Thu, 16 Apr 2020 20:35:19 +0100 Message-ID: References: <83ftd3e92z.fsf@gnu.org> <83d087e6gj.fsf@gnu.org> <421071D0-6D75-4442-AC4B-D091B573B49C@dancol.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="87271"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40661@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 16 21:36:19 2020 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 1jPAJ8-000MaB-FN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Apr 2020 21:36:18 +0200 Original-Received: from localhost ([::1]:38488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPAJ7-0006R9-Fy for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Apr 2020 15:36:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53075) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPAIw-0006NW-Qx for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 15:36:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPAIs-0006BD-OW for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 15:36:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56115) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPAIs-0006B5-LD for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 15:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jPAIs-0004rq-FW for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 15:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Apr 2020 19:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40661 X-GNU-PR-Package: emacs Original-Received: via spool by 40661-submit@debbugs.gnu.org id=B40661.158706575218690 (code B ref 40661); Thu, 16 Apr 2020 19:36:02 +0000 Original-Received: (at 40661) by debbugs.gnu.org; 16 Apr 2020 19:35:52 +0000 Original-Received: from localhost ([127.0.0.1]:39428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jPAIi-0004rN-Kr for submit@debbugs.gnu.org; Thu, 16 Apr 2020 15:35:52 -0400 Original-Received: from mail-oi1-f193.google.com ([209.85.167.193]:34532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jPAIg-0004r8-TV for 40661@debbugs.gnu.org; Thu, 16 Apr 2020 15:35:51 -0400 Original-Received: by mail-oi1-f193.google.com with SMTP id x10so23936oie.1 for <40661@debbugs.gnu.org>; Thu, 16 Apr 2020 12:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c+6787OMaMmV1+oePNzcG+WPYX6myZMbnMdmApKy944=; b=Jp5kHEa8C/0WEpinfBOZyHc++3fDgklmsAvNIcOSGJvzv8cpGnvUdoNEfapDHwkdKH wAhNcICN2WC9lCrImC6ao3B4bzLqLInDMKo5IDAcOTHI7fRRZnUEFaatm9U2nKaHHfBO tn+Yz8xNPOKhmk1mvHww/GYUDO+/uIgJGnMaOFS/y/aFU2xR5n8dUp2wbjaniYDYVT/c ZOrtQ5sPBmVHjLblHBgUIQWvkRCuap6ub4+XkYIfNMvX+cg0eIrzBdJN+azjQcUy1E9e vgAyS8s95p3NBCPXBiF7ak82RXDnBQOU8GG5Hf7N6k8ZKXm+2kC7qSaO1IB6m2VWPedv AldA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c+6787OMaMmV1+oePNzcG+WPYX6myZMbnMdmApKy944=; b=ZHAkxiUpXap0QBq9WeAGUK1Z19IJucDz0c7llj2n4i8asdQmdHQJGK2FooPkiVrE1R rtvfAyAscUMorRMMEJ0N3z79Tc+cuT5GoQYOsMT5eI0/9AXwE6RUfo94OEno/OiAMRyj 5ni6uh/p4lLQoAo0Za4yU10HPdTyWwv/IcnSil5E/oLCrXu58Hqp6xjeZV9c/TshmElu lZHzEroAaBvM6P7PpfA6SO5HKTIAiTSgtzk+E4qj9z7DpSv4iacAEi/16lQEzudSw7Fl jkxAxDhdd8eLtqN9iAGZx4rpA2UUNjrTS05oAZ3BiMdndFCmbqpxVWTnSoOdbpYtiHhd i8Cg== X-Gm-Message-State: AGi0PuaYQJAYE15B89GIOdAMIfkGTuajokRVNqhhZmgPEIKSOr+jFkBj k52uQG6M2d4EiQ9kCeArbzGytr+eVTL2tsDQGVoCAQ== X-Google-Smtp-Source: APiQypIVUfhtCUJGuJZsmstOv9W5On+mDxJPAaKetanqk13g70Sg1QSNYGhVh9MGlu8Di7j+An3wsNl6kRFPEHnjI1k= X-Received: by 2002:a05:6808:64e:: with SMTP id z14mr4037306oih.117.1587065745211; Thu, 16 Apr 2020 12:35:45 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:178475 Archived-At: On Thu, 16 Apr 2020 at 18:24, Daniel Colascione wrote: > > On 4/16/20 9:56 AM, Richard Copley wrote: > > On Thu, 16 Apr 2020 at 17:42, Daniel Colascione wrote: > >> > >> On April 16, 2020 9:33:16 AM PDT, Eli Zaretskii wrote: > >>>> Date: Thu, 16 Apr 2020 18:36:36 +0300 > >>>> From: Eli Zaretskii > >>>> Cc: 40661@debbugs.gnu.org > >>>> > >>>> Looks like GC sometimes kicks in while we are inside re_search_2 > >>> > >>> Or not. I cannot get a breakpoint inside GC to fire while we are in > >>> search_buffer_re, so maybe my hypothesis was wrong. Although the > >>> symptoms are all there: when the segfault hits, the pointers passed to > >>> re_search_2 are invalid, but BEGV_ADDR and GAP_END_ADDR, from which > >>> they are supposed to be computed, are valid (and different). And the > >>> patch does seem to avoid the segfaults. But maybe it's just a > >>> coincidence or a side effect... > >> > >> Try using rr and see where those pointers came from > > > > It seems clear from "str1=str1@entry=0xc607fd", etc., that they come > > from the caller, search_buffer_re. The question is, why are they no > > longer valid after updating syntax? > > Right. So let's see what updated the valid pointers and invalidated the > invalid ones. Right, I see. Anyway, I wasn't able to reproduce the bug under GNU/Linux (in order to use rr), or make much progress with GDB on Windows.