From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#75322: SAFE_ALLOCA assumed to root Lisp_Objects/SSDATA(string) Date: Sun, 05 Jan 2025 10:35:12 +0000 Message-ID: <87frlxczxg.fsf@protonmail.com> References: <87jzbbke6u.fsf@protonmail.com> <86sepx8sth.fsf@gnu.org> Reply-To: Pip Cet 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="36737"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 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 11:36: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 1tUNzj-0009NX-1L for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 11:36:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUNzJ-00025j-6i; Sun, 05 Jan 2025 05:36: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 1tUNzH-00025N-EW for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:36: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 1tUNzH-0006KO-65 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:36: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=pnM8fzWINOE2SzwkzRDccBeef8VO3w6Qo8XURkLpf58=; b=ty1GZM881C5fMxA+EzACqMwejx684JoSc/IRqGAVFX9QYW4+nRzbkhUVv0jZQU2/KIUOYt+QIazOTWi+LESZuDN6DH/YPhImLWxKhgqdXuWTU3w0NKFDHwNGuKYBpLVi6lY6n9J42mqEQ30Jk7CYMefyWw6zWYwtfGz6s4h0RCUXk78606V3F1g1ixj73v/ZR3vK2w9TH/bI9a0dFoX3zpkLun2NrwdV3N1ZmjejjAMmy1DyHhhWqF8iyfT1fBcxsXay06kld/ZiqX83G4yS5x6QQooX2O4Hvfj6U+v4PNfJmU9A/wj2hUjO8jlyjipwVS/jaL48ymEQW/PogbVGaQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUNzH-0002Eo-1D for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:36:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 10:36: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.17360733278503 (code B ref 75322); Sun, 05 Jan 2025 10:36:02 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 5 Jan 2025 10:35:27 +0000 Original-Received: from localhost ([127.0.0.1]:60031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUNyh-0002D5-HZ for submit@debbugs.gnu.org; Sun, 05 Jan 2025 05:35:27 -0500 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]:52383) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUNyf-0002Cp-GB for 75322@debbugs.gnu.org; Sun, 05 Jan 2025 05:35:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1736073318; x=1736332518; bh=pnM8fzWINOE2SzwkzRDccBeef8VO3w6Qo8XURkLpf58=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=SkExokzlWDKS2v09a/Ol9XY7q9t6NqL30RSSRVwKcHMjttU9D13u3xW9BqM0n61RK 2GdFKIu6RaAlyq97CQiRvdQKxdOkjoT6xPk/DqkixdPiBsXnH2NVvz3E1U+VQjR0gw jrl907yDl4ujFt0RStPJOH40+zQB8RSRvZLCr5bnEfBkwQZ5zao7QypnDtwywu14/S B/OQkWKjvoXzr/4pLR5i9AKVtLpNgNbxcEXqrhUT2FqePggWbyNAXUOT2/q8+q3a4M Zo1urzdsaO2h+xfiAN5RMMCGFppxHoJhI+7N7Wtgk7yBAZ5VwKkEMXHb81vqbVXBwR ruh+cm9wfVbTw== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: c33249577f5a4463a47329e95a7eb4b704bae18c 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:298531 Archived-At: 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. 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 :-) Pip