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 20:42:37 +0200 Message-ID: <86ldvp6r1e.fsf@gnu.org> References: <87jzbbke6u.fsf@protonmail.com> <86sepx8sth.fsf@gnu.org> <86h66d8pnl.fsf@gnu.org> <86ed1h8nji.fsf@gnu.org> <86o70l6ucl.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="7455"; 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 19:43:15 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 1tUVal-0001nR-EU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 19:43:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUVab-00083I-MV; Sun, 05 Jan 2025 13:43:05 -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 1tUVaZ-00083A-NF for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:43:04 -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 1tUVaZ-0001bD-09 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:43:03 -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=ksdRAmOixCU8bRtI80IfzOlpum8pFi0ENWfyCNjADWY=; b=TDHek23xTI6wj10GNAhkc49KJV3rzmrYoa4nhRsb28QZQn/3HriK5BMGngiEzT8i2kYsfG7Af2Rb0zVMr6Li8hFiY2hEIZSLLckxzUgDbzGw01AMhjqIqwX/R6BDVk6+rGnfnolwgAe6YhbTAp8L34Bwgn9uvVGkXunZ+jG670ETd/ymNDklvxcuMZsdNxZbpzCZOSt1QChT/CH3K4Nk5TN2BMBqKW1ULx53UDUiHoLfmRFKkWbY0AwztWoYjYPturNJzRamLCcoKwwrNGjitmMzJds30YytTe+O0k9Hk88D+vSrXpbe1oXvSphjJviDtE5Rw6gRntslJrhImY9oXA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUVaX-0002Si-SA for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:43:01 -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 18:43:01 +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.17361025759444 (code B ref 75322); Sun, 05 Jan 2025 18:43:01 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 5 Jan 2025 18:42:55 +0000 Original-Received: from localhost ([127.0.0.1]:35192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUVaQ-0002SG-UL for submit@debbugs.gnu.org; Sun, 05 Jan 2025 13:42:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48224) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUVaN-0002S2-Kh for 75322@debbugs.gnu.org; Sun, 05 Jan 2025 13:42:53 -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 1tUVaH-0001aY-UG; Sun, 05 Jan 2025 13:42:45 -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=ksdRAmOixCU8bRtI80IfzOlpum8pFi0ENWfyCNjADWY=; b=mAx2+4ycyKW8YSXKgKVQ /+mx9XHgY4Lhx1Ky3sRa4o+//OkZA1oZTy3O3VoYR7lJ9OU9GhlAXi9wWkH7APIi44gTivrw3LZ05 46/LPwBHr8aLFCzLf8XokEYkmQ8vg9cz8wTWC1rAKoYbBlC/QO31dPTs8OaaFSGMrVb/hSqkoTsx6 jeAmKS6CvN2e9Qi34NxjorCGdny4lEz0k6q9uOyGZIN3yoDzzQNPXLeKgFJRo9gGCCdyMja6toztm WshRGwBk9GTmVc2ZphXREUzIY7ulkvohS3b+LJb2WwdaHf24sKD5uATtR+ZjrIL5e2nSKniF7XBWu Ph4LWVMuZccPNQ==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Sun, 05 Jan 2025 18:49:56 +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:298590 Archived-At: > From: Gerd Möllmann > Cc: pipcet@protonmail.com, 75322@debbugs.gnu.org > Date: Sun, 05 Jan 2025 18:49:56 +0100 > > Eli Zaretskii writes: > > > This surprises me because on the master branch SAFE_ALLOCA_LISP either > > calls alloca or xzalloc. So I don't see why SAFE_ALLOCA_LISP would be > > safer in the old GC than SAFE_NALLOCA. It's only on the igc branch > > that you made SAFE_ALLOCA_LISP make a Lisp vector. > > But this is a tangent from my POV. I would like to discuss the new > > GC, not the old one. > > > > This in SAFE_ALLOCA_LISP_EXTRA > > (buf) = xzalloc (alloca_nbytes); \ > record_unwind_protect_array (buf, nelt); \ > > makes a specpdl entry, which makes mark_specpdl do this: > > case SPECPDL_UNWIND_ARRAY: > mark_objects (pdl->unwind_array.array, pdl->unwind_array.nelts); > break; Thanks. I guess it's supposed to be "common knowledge" that record_unwind_protect_* indirectly causes the objects to be marked... But then why don't we set the .mark member in SAFE_NALLOCA or some variant thereof?