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:30:11 +0100 Message-ID: References: <87jzbbke6u.fsf@protonmail.com> <86sepx8sth.fsf@gnu.org> 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="18094"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pipcet@protonmail.com, 75322@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 11:31:30 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 1tUNus-0004ZL-4H for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 11:31:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUNuV-0001Yg-0o; Sun, 05 Jan 2025 05:31:07 -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 1tUNuQ-0001YM-5h for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:31: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 1tUNuP-0005tC-Tg for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:31:01 -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=AqDSLmw14RsdUHIzjfxoEXHRJWRxki/wk3TB3dg/Qkw=; b=Add7YoeJdOEwQVAOk2cuwnlefq+Ve/ZwCjCOW6zmzHN5rPLslXh2VO96L2nI9sXQXdIBQaa57NqMjh8DcrZB5NYgaQpU/bp8fZytAPX/jtTHH0GtexyxiADDXKx5LmlgGIPJWt7KqZNDmEdRvgF9MMNikelKtgPliKsYZzkV35+X4XGjbtfs1VzRlkl+s3YaiMnWLCJVGRS2I5LtN6+8Zza392rljT2Byx/BaKeRpCxHY8olpPMvurTZ2/cTufLjZQ5WRvP82kycSTMKYweqehssF+nmTvC929SXQXho5kYXOL1TnNgMRNbzOZlj8FJx/tfIP54PEzeFk7LQb4Vpow==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUNuP-0001yK-Oh for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 05:31: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:31: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.17360730237515 (code B ref 75322); Sun, 05 Jan 2025 10:31:01 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 5 Jan 2025 10:30:23 +0000 Original-Received: from localhost ([127.0.0.1]:60014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUNtm-0001x7-R3 for submit@debbugs.gnu.org; Sun, 05 Jan 2025 05:30:23 -0500 Original-Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:42158) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUNtk-0001vc-GV for 75322@debbugs.gnu.org; Sun, 05 Jan 2025 05:30:21 -0500 Original-Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43635796b48so81241895e9.0 for <75322@debbugs.gnu.org>; Sun, 05 Jan 2025 02:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736073014; x=1736677814; 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=AqDSLmw14RsdUHIzjfxoEXHRJWRxki/wk3TB3dg/Qkw=; b=nANNBEfEXrxUxMGbLp6GTfZUm6Jyfa5JP2I/CIigKO8HDWEBkeMzlyTEBV+DaIKk0O ErHhwiDgpjNTfLtvXSuVri0Vswyz0Igt7/a4zS7pGpEgmK2SdKbMY/ZIcrJ8JyPtrMYK UElEB8mjsaPYSbovOh0j+EFu3634v/9jSFQ0Ht+hJerJ4OVKoYNo+hXBZ9hlGTr2SCWZ AlcBBOhUL/CDqzdn8cXc5Zlqx734cB9xvyc1DZt5IjioL+mDxgbVVVGC5kzT6H3JQVw9 5TuX+X6OcYX1g/GD3v3vteobezFg8PDUVE/BvHpvxyR0KYU+aKo4R8ctXfMCrz8GAr/1 roMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736073014; x=1736677814; 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=AqDSLmw14RsdUHIzjfxoEXHRJWRxki/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Received: by 2002:a05:600c:5d2:b0:436:747d:55c9 with SMTP id 5b1f17b1804b1-436747d5775mr389807755e9.5.1736073013765; Sun, 05 Jan 2025 02:30:13 -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-43656af6c4esm569731415e9.4.2025.01.05.02.30.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 02:30:13 -0800 (PST) In-Reply-To: <86sepx8sth.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Jan 2025 12:21:14 +0200") 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:298529 Archived-At: Eli Zaretskii writes: >> Cc: 75322@debbugs.gnu.org >> From: Gerd M=C3=B6llmann >> Date: Sun, 05 Jan 2025 07:59:32 +0100 >>=20 >> Gerd M=C3=B6llmann writes: >>=20 >> > Just want to add that all SAFE_NALLOC uses should be checked in >> > scratch/igc. For example, set_overlays_multibyte uses it to store >> > itree_node *, and itree_node is in MPS. >> > >> > I think I'll just make it allocate a root in my Emacs. That's the least >> > work. >>=20 >> Please find attached what I'm using now in my Emacs, in addition to your >> xstrdup commit. > > These two are alternatives, right? IOW, we should use one or the > other in each specific case, is that correct? If you mean the two patches I sent with "these two", then no. I prefer using SAFE_ALLOCA_LISP because that introduces an exact root. 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 true, i.e. having the xstrdup change fixes only 1 case.