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: Sat, 04 Jan 2025 09:00:40 +0200 Message-ID: <86sepzf4h3.fsf@gnu.org> References: <87jzbbke6u.fsf@protonmail.com> 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="27430"; 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 Sat Jan 04 08:01:23 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 1tTy9y-0006zP-R0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 08:01:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTy9h-0001nX-55; Sat, 04 Jan 2025 02:01: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 1tTy9e-0001nK-OZ for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 02:01: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 1tTy9e-000654-G7 for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 02:01: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=75TKJ/iQ4bjzYK1Mwe9ffv3G1WINXCnTvEugBxsgoog=; b=i9s9Va3ZOywOk4Ce4XdampQfph/Hm5K0i/W3iu1W/Dzoqwfnr3KERsZOt3o9s1E/aBi6bJ9DpyTOqKOS3h3KxFgi41B+9oDE6SNYJ+qJ5PkILUdQYqxZ/kM5BtwGR+ovMqiYTn7Z3UZBCWK35d3T8vL7DC/1BPg9XmUkwPzeoTtRg45sWTEzOQm5KrF3MNUYkI7qy+2fEVKxLR3HjyIodYHyPtP4s0ga36ASErSJXiodQezgXfxfgrdq7YhH7iUtd832BB6wYOyVVEKgKizj0SwwrbSRh6dHpDNifM8LCKBokxFRj/pB2vurYWVd1+gtPJB7rtEIXhNuD+nzshQnHw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTy9e-0006uK-1q for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 02:01: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: Sat, 04 Jan 2025 07:01: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.173597405226529 (code B ref 75322); Sat, 04 Jan 2025 07:01:02 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 4 Jan 2025 07:00:52 +0000 Original-Received: from localhost ([127.0.0.1]:53136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTy9T-0006to-MY for submit@debbugs.gnu.org; Sat, 04 Jan 2025 02:00:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42648) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTy9Q-0006sx-L5 for 75322@debbugs.gnu.org; Sat, 04 Jan 2025 02:00:50 -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 1tTy9K-000642-FH; Sat, 04 Jan 2025 02:00:42 -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=75TKJ/iQ4bjzYK1Mwe9ffv3G1WINXCnTvEugBxsgoog=; b=Nf27+fwmAqEPivJt9bVv s2wB/tHwCSAmWGzA085o+JPonhwRKfRgi2Pk29HlsvscNVOpYvFPH5036DpuJAKeL/wMWXVgkX3Ut 4JL+PDHxFcbrnhhDMrkxItzYRGiIKtboNGm2hZPUWmMonbY9N8eZSSY23mnmQ3QD0HjckZQc2JAFa Xz/cTel/uS8jwwKDWu5qTiqQz9egqHdxm8OePn7NeNag9dFCp5PKXAdzrnXJ9UFFwkiYUqNZnKT7B ZdtQFWNTgI2ku1BD3Un/Y2jnttmLihGf//B4N6ue+6irGqAP3rdtvf5GxaLN9HSQ+YeKkhCbBJqNb KGPZDcFvF8ObpA==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Fri, 03 Jan 2025 21:34:07 +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:298325 Archived-At: > Cc: 75322@debbugs.gnu.org > From: Gerd Möllmann > Date: Fri, 03 Jan 2025 21:34:07 +0100 > > Gerd Möllmann writes: > > > > > The pointers to string data case probably requires adding yet another > > macro SAFE_ALLOCA_FIND_A_GOOD_NAME, which, for MPS, allocates a root, > > possibly and exact one which would be good. > > Or one does it as you did in b0a209e9204, that's of course also safe. > For both old and new GC. (Don't remember if you mentioned it Pip, but > old GC moves string data as well, during string compaction, should GC > run). The current code in callproc.c assumes that GC cannot run while we are parked in posix_spawn or vfork. Is that assumption false with MPS? If so, what would trigger GC during that time? Another question is about the global Lisp variables in 'globals'. For example, Vprocess_environment actually globals.f_Vprocess_environment. Is this large struct protected from GC, i.e. can GC ever decide that process-environment is not used and free it? If it's protected, where and how is it protected? And if it is protected, then any members of the list that is the value of process-environment are also protected and cannot be freed by GC. If 'globals' is not protected, I think we should protect it, no?