From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#75322: SAFE_ALLOCA assumed to root Lisp_Objects/SSDATA(string) Date: Sun, 05 Jan 2025 11:45:31 +0100 Message-ID: References: <87jzbbke6u.fsf@protonmail.com> <86sepx8sth.fsf@gnu.org> <87frlxczxg.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30813"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 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 11:46:31 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 1tUO9N-0007tP-Aj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 11:46:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUO90-0003Jf-4P; Sun, 05 Jan 2025 05:46:06 -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 1tUO8w-0003JD-82 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:46:02 -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 1tUO8v-0000xT-Vk for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:46: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:Date:References:In-Reply-To:From:To:Subject; bh=nLDfioJAM0nLcRnykTOOpFYccHJMtVDdEdmaje4F4HY=; b=RUtb4JXyrLje1fhE/7jXIjjfDFz5Sjndtd1Le8lcWmeVFrOKk/xEzGsWsaiNYqxUwQIBEuSAVX0GV/FgDDNtK4VBYeIXBIdRjGiJdYVheX8Sudu5j3JTn0Rh4c7FdT2P60OMJBxP4TroIgi+3RkDEtbH72AEJA+BgI70cDGUT3bUEJ+kPWDDX+B+jLR7Qhuiw87U+CWhqRPnRSYEO8c//YCO002Z8mnxYrwkPQ1aMWV8XxhXqQTABk6W2UoQ7A6klxvRbj5Iiw5ZSOsNsxJrG5hY/l5V7XASqiQ1PmX1ZAoUPGS8nKdDHnGoYPYQTfqYe1IFZNhC9oKDwQ9xlcKkIw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUO8v-0002l9-QE for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:46:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 10:46: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.173607393710545 (code B ref 75322); Sun, 05 Jan 2025 10:46:01 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 5 Jan 2025 10:45:37 +0000 Original-Received: from localhost ([127.0.0.1]:60058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUO8W-0002k1-Oc for submit@debbugs.gnu.org; Sun, 05 Jan 2025 05:45:37 -0500 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:60738) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUO8U-0002jq-RI for 75322@debbugs.gnu.org; Sun, 05 Jan 2025 05:45:35 -0500 Original-Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4361f664af5so153245805e9.1 for <75322@debbugs.gnu.org>; Sun, 05 Jan 2025 02:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736073933; x=1736678733; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nLDfioJAM0nLcRnykTOOpFYccHJMtVDdEdmaje4F4HY=; b=CEMdI9NlkXJZUdz1IZBjUOsJMlm9BsoetICr4iqY/72R9+7StTCVHeIKcUII1NWmdH efUr4qkG4G6AJjfTySTIGHM6MfVm4waMBHa3sqoLAEqywWCWNzNNZHeR/BC5kY5ybvBe snP/AMEBB10pK/fBv8f3O0fGci+jO8dEukyocUODcwRZSiPI3wtGgiTqhU7QnVwyT1fD GxXw0hE34V6+ofEsfac1QDTh+G+NOR7o8yC+17+ZwWdjpeADW+MSMOXwLXqTPPxagkXj 7kujGbigCQ1Hda1dlLtFkFLzroDMv73O71wTNuECBPq+CIlQIAyHX9vLrjJ2Ew3WTtIu IYMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736073933; x=1736678733; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nLDfioJAM0nLcRnykTOOpFYccHJMtVDdEdmaje4F4HY=; b=AaFGrSXt5jKV1pJdk9/yCXx9otelmScf83sYZ9tgp/+lzmH28a+KebL2cs6NRzUMgI r4l82OElxFxnpbWB11hxJlRg5DfQYbLxMs9OWgwvWMpC57nZKnYU62T4Gky3niiGXKUl FA/Ar7F3X54ke64IhjP8My4ynB8eoo2vtREO8biw6gSqnGhsIUN31yE9vmuQ6XPTRO9B eGaeWnDxf1bLXWhraeQ/Og4piZYHrcR89B9nc/uzFRFTS/0Z9OdaS1lXf9U5ohxhx9ZU QjxOvXQ69W+Uu3ly1HINhpdGQZl75Pzbg7YwEW8OPm8wRS/H0B2zOJdWvMDVIp/pEXPt A4jA== X-Forwarded-Encrypted: i=1; AJvYcCXwC7DC9uHnmaoePCUp+SyZ6WlECi0soY08egC2M2xlA5fTqwvjYTvXeItuagB0FtIlq+zGjA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyRI6BTQzwlpCoGXe4S6QnuXBEC5a+yr43srwoNLfhl3Vd0kPQa XFfy8vpq7J8WqQXaN3me4PuEEjnsoaM8D041I9SStHNWs3Vwhiwh67dHrQ== X-Gm-Gg: ASbGncuwIizNM5HmqbfKT8A03K/OI7hIMSBntAwF7d2cPFJFCIAHrOGRpRLPALyvliM jiAVJXUjwkMfvPQlHfS7bvOo2vwYAYGqOvF56LoSk+e0p5lZii7x4K0ektzOtbyZdfhU58KOnui ZWeCA2I1MJh6a50UVsNVU0UZolDmM95yKwDRgErpTPHJHlRG/X+PseqOap6mpCDKtH5jGajH9FA LpQtTuwI6Fb9LAM5S8V4SWBnuiWnvIgyfDbFnFdCcCklocD/bh3NCef7oMrLBUbj/trzkOtuG1t +XQ6+8zAmSDMbuJwpOpYkWmEb/cJU21yKS0fV7XiCtSqyKZBGDTKSguyeuBQG/Iubg== X-Google-Smtp-Source: AGHT+IGVNjBVl+0MxJosjIfED4vU1xUV4h7ERBvudWU+UhGCvcpE08+wVxuu/e3wRpIzre0DXaC/Ug== X-Received: by 2002:a05:600c:3106:b0:434:a802:43d with SMTP id 5b1f17b1804b1-43668b93817mr444294995e9.27.1736073933240; Sun, 05 Jan 2025 02:45:33 -0800 (PST) Original-Received: from pro2 (p200300e0b747500078d774d9859911e7.dip0.t-ipconnect.de. [2003:e0:b747:5000:78d7:74d9:8599:11e7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436612899f0sm536205835e9.38.2025.01.05.02.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 02:45:32 -0800 (PST) In-Reply-To: <87frlxczxg.fsf@protonmail.com> (Pip Cet's message of "Sun, 05 Jan 2025 10:35:12 +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:298535 Archived-At: Pip Cet writes: > Gerd M=C3=B6llmann writes: > >> If "these two" means xstrdup and my SAFE_NALLOCA change, then yes, kind >> of. It doesn't harm to do both, but it's not strictly necessary to do >> xstrdup if the SAFE_NALLOCA change is in. The other way round is not > > For argv, I agree, but make_environment_block uses xnmalloc and assumes > SDATA pointers in there will survive, which they don't, according to my > GDB log. Ah, okay. Then both xstrdup and SAFE_NALLOCA. Which I have here so I'm good. > It was very brave not to start out by making every xmalloc an ambiguous > root and fixing only those that we know to be safe :-) The SAFE_ stuff was only 1 out of 6542 things to get going. And I'm absolutely reckless anyway :-).