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#75322: SAFE_ALLOCA assumed to root Lisp_Objects/SSDATA(string) Date: Sun, 05 Jan 2025 14:15:13 +0200 Message-ID: <86ed1h8nji.fsf@gnu.org> References: <87jzbbke6u.fsf@protonmail.com> <86sepx8sth.fsf@gnu.org> <86h66d8pnl.fsf@gnu.org> 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="5696"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, 75322@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 Sun Jan 05 13:46:07 2025 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 1tUQ18-0001IJ-OC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 13:46:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUPY4-0002J2-Np; Sun, 05 Jan 2025 07:16:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUPY3-0002Iu-3R for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 07:16:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUPY2-0001E0-Q4 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 07:16:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=Yr9VDYnlgg1W/bn+d1aDTVoQxjvmR9yE6NCF9cuUvOs=; b=Hhyt/wtBSm8sTf3Xd+WVkYfba/w/Cn18ovybTJMmni3FBQqaUKjhyI9Yrh6kuEMLG0Lw7d0sOv+mRvaZDz8+jxv+5VGhC9DtHJHEGCUET89gfMJiPlLEBTiKV4XL0ngDbdnjFfSOjlI6IZC9EM61dprP39uPktMKZOeEJtsxNgJEP3QAyCeL5EU0J0UdSpHhsk+jd19cBn8mHhDFaEIGbfV5GFgZCkI8AclRzQxm6Sfsh4bwZb6cnsrQ4/FPN1nOAcQwr/vPtGMSAte1ItWlFU6oVLMJAOPuMqlzQo4NQfqmD5ZxTRKqYHCv0Lx69DhKjZGrFxX/Te0VUrORh2VxzQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUPY2-0007b9-Bg for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 07:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 12:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75322 X-GNU-PR-Package: emacs Original-Received: via spool by 75322-submit@debbugs.gnu.org id=B75322.173607932329134 (code B ref 75322); Sun, 05 Jan 2025 12:16:02 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 5 Jan 2025 12:15:23 +0000 Original-Received: from localhost ([127.0.0.1]:60245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUPXP-0007Zq-0i for submit@debbugs.gnu.org; Sun, 05 Jan 2025 07:15:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41864) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUPXM-0007ZY-Kb for 75322@debbugs.gnu.org; Sun, 05 Jan 2025 07:15:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUPXH-0000KC-7r; Sun, 05 Jan 2025 07:15:15 -0500 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=Yr9VDYnlgg1W/bn+d1aDTVoQxjvmR9yE6NCF9cuUvOs=; b=CplT53oL6Q03nf1yDYa3 hfb5us0c+fsLrqsByJhBjYu+dYESco47O0pnqDPaagZylbZxipdlXKgEZ7xeNiJ3yY6v5yYM4QlXl C27KxdjCb7V69EPftGlGJEUhHrB5Uz4/qLIEN4hp+7tQ4jVyeIluTBt1KIEDk5aNvQicZp4qRWiGc E6ItNvjPMrnL9rPHC/Dfx6y6ar1WNg+2gdS4tUipsMtAqPzqEjgXZ133gTjvAywIsn3ZNs5QHEm6o PEGsl3vSMFewd/8mOODNlGO4j8T3IxS/EYcuyBaFcRVy8lY1FhcPvCJ+WGeoeoxCFAIVPy/iv9Y4R V4kF+mcrTtgV6w==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Sun, 05 Jan 2025 12:37:42 +0100) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298556 Archived-At: > From: Gerd Möllmann > Cc: pipcet@protonmail.com, 75322@debbugs.gnu.org > Date: Sun, 05 Jan 2025 12:37:42 +0100 > > Eli Zaretskii writes: > > >> If you mean the two patches I sent with "these two", then no. I prefer > >> using SAFE_ALLOCA_LISP because that introduces an exact root. > > > > I guess I'm confused, then. The first patch replaces calls to > > SAFE_NALLOCA by SAFE_ALLOCA_LISP, the second patch modifies > > SAFE_NALLOCA to call igc_xnmalloc_ambig. That's why I thought they > > were alternatives. > > > > If they are not alternatives, then why did you replace SAFE_NALLOCA in > > the first patch? > > I checked other uses of SAFE_NALLOCA that were not yet mentioned, and > found another problematic case. (Something with struct itree_node *, > don't remember the function name, it's in some other mail). There were > too many grep hits for SAFE_NALLOCA for me, so I shot with a canon :-). OK. So can we talk about the relative merits and demerits of using SAFE_ALLOCA_LISP vs SAFE_NALLOCA? First, why is it better to have an exact root than an ambiguous root? And second, SAFE_ALLOCA_LISP conses a Lisp vector, which will increase GC pressure, so isn't SAFE_NALLOCA preferable at least in some cases?