From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: emacs-27 41232e6: Avoid crashes due to bidi cache being reset during redisplay Date: Sun, 31 May 2020 16:24:23 +0000 Message-ID: References: <20200531142645.22884.78754@vcs0.savannah.gnu.org> <20200531142647.08FCA20A2B@vcs0.savannah.gnu.org> <837dwskuiy.fsf@gnu.org> <834krwksz2.fsf@gnu.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="13614"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 31 18:26:20 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jfQmx-0003RW-VS for ged-emacs-devel@m.gmane-mx.org; Sun, 31 May 2020 18:26:19 +0200 Original-Received: from localhost ([::1]:48838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfQmw-0006rK-SC for ged-emacs-devel@m.gmane-mx.org; Sun, 31 May 2020 12:26:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfQli-0004yd-FS for emacs-devel@gnu.org; Sun, 31 May 2020 12:25:02 -0400 Original-Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]:46423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfQlh-0004OX-FY; Sun, 31 May 2020 12:25:02 -0400 Original-Received: by mail-ot1-x32a.google.com with SMTP id g25so5987825otp.13; Sun, 31 May 2020 09:25:00 -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=OX9Mie9NYU0gg3m9W8pf61vYo7k9nXd10d/4SO2zq3k=; b=h4WJKgFeozwloYmQA+hve293cIJ0W3hE0g+z1baHq46JrQq6v7W1ki4ZBZeeXIFET2 c2fIRoPl8JTbxgmxcq3MGdBIPZ/bLqYlcIn529MZvH74W/wFxr17TK1+sWlHzkHGxJvn khXvxAkV57he66cUDDlOrFQIISSbJqv0VYlvxt4zXJcUPaBA9CHs4qXMO4QsFheR0ce4 iFTjyxhNUKdEGn4gl3tAuKECC1w5MDYtP6exsm0BRcSr7EgSWsiIySV2LvhCIkvSjltm yAOwuREgwMNJrS/m2Qt3gJTr/ERLNd2ku51RNAUWKSy5NZrKmhd4CC4uI+58SSH4J1th /LWA== 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=OX9Mie9NYU0gg3m9W8pf61vYo7k9nXd10d/4SO2zq3k=; b=Vf3uf/nQWLRH0roeJqupBIhFuCV+/nr8PLRtqSJ/3BOT/BGk4TvYI0A8d0H26kbtR5 9pybmRUuceu6mk9wH/bCiKzengZSLK7owyoFuNbEZyTVUcuIkKQYEetC7rt3zHMVVBKc HHqNwaAMM7eDGeYsHSgHWHubhXVcm0nD7rls3qfR20nY4WqZt72l1A9ZXAkr2huKp+D7 UGILBS6PJ1ukQW64LWjpXdBxylZxOmcTlXhVyEGqFNqFMTz0p30U69ngvi8PP8fbvXYw U9dLRMjTv8nq9Jo6MBMPVINJ9NAnxi5KVOqFV3TpQBsWNL0m1HvznokkQQv87ANWcoGj 0vbw== X-Gm-Message-State: AOAM5305ldNhvvUo2f4jdzsXZNlLWXENI2OGWcI/NF7Enn5C7Gz+LZ6t /BitWfybnq8Q8nUVq+cWHNskfkjjaBleFRgGbVp3bgob X-Google-Smtp-Source: ABdhPJwllmsn+FbsJtril8oXGo8M1a55V0EGpZUN1Egp9uV9hOLn1r77cYCjLmIGc6v2YDrWNDB7zd+AMVrnMfOLtgQ= X-Received: by 2002:a9d:6a44:: with SMTP id h4mr14111933otn.287.1590942299691; Sun, 31 May 2020 09:24:59 -0700 (PDT) In-Reply-To: <834krwksz2.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::32a; envelope-from=pipcet@gmail.com; helo=mail-ot1-x32a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251682 Archived-At: On Sun, May 31, 2020 at 3:46 PM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Sun, 31 May 2020 15:36:22 +0000 > > Sorry, should have been more explicit: if we run out of memory, > > memory_full will signal an error, after freeing some "spare" memory. > > The error handler will call echo_display_area_1. If the bidi iterator > > is in use, the cache size is much larger than the spare memory we > > freed, so the allocation will also fail, and I'm not sure we ever > > recover from that. > Yes, our code is full of such places. It would be good to improve the > recovery in these cases. I've played around a little, and when resize-mini-windows is nil, it's quite easy to get into a loop where the OOM message isn't displayed. Without the patch, recovery sometimes works. Maybe it's just time to update SPARE_SIZE to reflect the amount of memory the bidi iterator currently needs.