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 13:04:37 +0200 Message-ID: <86o70l8qt6.fsf@gnu.org> References: <87jzbbke6u.fsf@protonmail.com> <877c7aha9n.fsf@protonmail.com> <86y0zqbgot.fsf@gnu.org> <87ttaee5qp.fsf@protonmail.com> <86a5c6b9sb.fsf@gnu.org> <87ikque0xp.fsf@protonmail.com> <864j2dacuz.fsf@gnu.org> <877c79eipq.fsf@protonmail.com> <86ttad8v37.fsf@gnu.org> <87ttadd25l.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19050"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 75322@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 12:05:44 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 1tUOS0-0004mJ-0E for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 12:05:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUORL-0005oh-Vz; Sun, 05 Jan 2025 06:05: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 1tUORK-0005oG-Ud for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:05: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 1tUORK-0005jc-M2 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:05:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=pNjkTq/efNlcieYm+ff4Xou2Ycq2oMSXBh/Q06WUQ2o=; b=Y9OJZ8SW/VbAU8TBGcyrjzI6RTnylWxaaui3MA62g/42ukT54gGZf9KuVvYUrVr07CBYlXIVIjG61NvjSS5eiBHlfMkT+ttWxJlvwuXOASGyPVIi8SHvkqdlLN7iWa0yBZh49cZT5sKVR5cfe2vbM1JaVWSuSLf1SpdQ8gIZMYCNGo3kl/X95AAxfiZ/WFcZtERg+6O7quzmtVXfOZ0ipt3Y97EBeencci70DAU2/MgTyWgIFEOpZk1t7sHsUgHI7CIOv3yq7GWHyksGT357RB9Cj2jWu73kK75XeZRAzJWCcdh1Hjq6YEs/aYiA1fGgFs8eEUw9MdnIAxLvnatMZQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUORJ-0003gS-UK for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:05: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 11:05: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.173607508914115 (code B ref 75322); Sun, 05 Jan 2025 11:05:01 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 5 Jan 2025 11:04:49 +0000 Original-Received: from localhost ([127.0.0.1]:60085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUOR7-0003fb-2u for submit@debbugs.gnu.org; Sun, 05 Jan 2025 06:04:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34030) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUOR4-0003f9-Uy for 75322@debbugs.gnu.org; Sun, 05 Jan 2025 06:04:47 -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 1tUOQy-0005gg-Uj; Sun, 05 Jan 2025 06:04:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pNjkTq/efNlcieYm+ff4Xou2Ycq2oMSXBh/Q06WUQ2o=; b=q8mnxpFw194k MQRCxZjOwEVInfrKRpMBQ/+3PBuqxmySqmEYEI90ddXNJbxsbrajYIB4fHsJnkHtmzWk7LmkR4cz0 Ort2YY81BMe6Pz8W9Av09oJXSONQFN3XVPPwDkP6b7VjozE8v7/Fty5iUuR/pF10B3vpp6gBdCwpT N1TiC/9dkakMC4VVl4l8sVnr/tQplUIfs6Ft7PZjpuvpq8HEVVFrkFUFS0LOrgDD5IALUNvx+a4Of qHVBKa2Xen3z3ZQhicIHlnBlfn1ZFl6Ky8m8B/mbyZhZ0u4ySt3px8iIeh5epwrMQ9F1MWDQyrsrl EDNIKMdvkyapavCyc6EAMQ==; In-Reply-To: <87ttadd25l.fsf@protonmail.com> (message from Pip Cet on Sun, 05 Jan 2025 09:47:06 +0000) 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:298536 Archived-At: > Date: Sun, 05 Jan 2025 09:47:06 +0000 > From: Pip Cet > Cc: gerd.moellmann@gmail.com, 75322@debbugs.gnu.org > > "Eli Zaretskii" writes: > > I don't suggest to avoid GC. I suggest that where GC _can_ happen, we > > must reinitialize the pointer to string data after GC. > > That suggestion is incorrect. MPS GC can and does happen while we have > SDATA pointers on the stack, and we rely on it to keep those valid. Since we've established that MPS works on a single thread, which is our Lisp thread, then GC cannot happen unless we make some call that could trigger MPS GC. Thus, whether or not SSDATA pointers are on the stack is not relevant to when MPS GC could happen; what matters is the code that is executed. > IOW, MPS treats SDATA point the same way it treats Lisp_Objects. I don't understand what that means. What is "SDATA point"? What is the meaning of "treats the same"? > The problem is that like Lisp_Objects, SDATA pointers cannot be > moved to xmalloc'd memory and retain their validity. No one said they could. This is trivial. > As long as you think MPS requires us to avoid GC in this case (this is > implied by "we must do this or that after GC"), your understanding of > how scratch/igc uses MPS is fundamentally incorrect. Maybe my understanding is incorrect, but this style of "discussion", where you are working hard to prove at all costs that I misunderstand the issues and to point out my mistakes, contributes nothing at all to understanding. It only contributes to confusion.