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: Mon, 06 Jan 2025 15:26:15 +0200 Message-ID: <86v7us5b0o.fsf@gnu.org> References: <87jzbbke6u.fsf@protonmail.com> <87msg7iq0o.fsf@protonmail.com> <86ed1jf1tp.fsf@gnu.org> <865xmugawr.fsf@gnu.org> <8634hx8k1u.fsf@gnu.org> <225431A0-98C1-4F95-B290-AB86F5379030@dancol.org> <87sepwvo04.fsf@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39751"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, pipcet@protonmail.com, 75322@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 06 14:27: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 1tUn8c-000A9w-RG for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jan 2025 14:27:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUn8Q-0000tx-BA; Mon, 06 Jan 2025 08:27:10 -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 1tUn8J-0000og-7Y for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 08:27: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 1tUn8I-0007Kd-SC for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 08:27: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=gr6nPRWqV+tgpKxpiDemihrTKHZv3r/9zu4Nrf37XSI=; b=M/BQ4BGpYi4eNGPG1Uvx6FkmbwOxjoG2imFu8e81+rGB1SngigJuW3H54t0mf6gX+eyUtKLqVbLRWZks+1F8YMHFUkjIu2hu4aPmO2bMwmegGCEJI5Ldd6yiQn5qCTY7RGiWHrD8Mvg9HTWPMhrMfjcKNvVfDhrbifmcXDCPS7+wUtK3HpPMzJdK3QzRwaEMBO/4w+8AMMz3NquwV8HEV6tQeijcEcr9aaviDMdNB4kQn++ViUTNaE5B1qCsGj+NNrvrk6YqQr5sT9FQGkXwBB3xZvos5zScOqexAgzwA+h68+AE3zXfIbjIrpFOQf/Q1MQaRwdIpcNVc1hlOxzjaA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUn8I-00044B-Kn for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 08:27: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: Mon, 06 Jan 2025 13:27: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.173617000515590 (code B ref 75322); Mon, 06 Jan 2025 13:27:02 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 6 Jan 2025 13:26:45 +0000 Original-Received: from localhost ([127.0.0.1]:37285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUn7w-00043D-QZ for submit@debbugs.gnu.org; Mon, 06 Jan 2025 08:26:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39584) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUn7t-00042s-Hs for 75322@debbugs.gnu.org; Mon, 06 Jan 2025 08:26:38 -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 1tUn7m-0007Ih-SY; Mon, 06 Jan 2025 08:26:31 -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=gr6nPRWqV+tgpKxpiDemihrTKHZv3r/9zu4Nrf37XSI=; b=DfEHN0NkclSb 3PX6c/dfn50Q/HGlLNPS/Fz83em9z0qmQLq1PTv4f8nTJJk3D7SeUz2DVTnwnHZAjmtnAaQh3w4TG SoJTt+LBYdQP2Gyp2+a6VLnKaCbhx1bRnSjuKL316HlrbK7KuhE9sMd/J5RuxJu7M7Nyj9bf1q7ua o2Ola6KpWXxzIK5lL95d3VHIV1oXkDwEEAtquExNuapb+4TAqDyb1urpdEwy2x8SH+G/RPDCCoWnP zZZZ305dYe09BAl5zIP6xNFAy054zh9c8rsuksHhRTW/jYEJr8Y9lXCnCZ5U2ERSj/gljWJH0/2xa Sng/RzUoTODNIEe9u/BVeg==; In-Reply-To: <87sepwvo04.fsf@dancol.org> (message from Daniel Colascione on Sun, 05 Jan 2025 18:28:59 -0500) 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:298654 Archived-At: > From: Daniel Colascione > Cc: gerd.moellmann@gmail.com, eliz@gnu.org, pipcet@protonmail.com > Date: Sun, 05 Jan 2025 18:28:59 -0500 > > Daniel Colascione writes: > > Here's a demonstration of the problem. Run ./emacs -batch -Q --eval > '(acos 0)'. If you leave demo_crash to true, Emacs will abort quickly > after we detect a use-after-free. If you set demo_crash to false, Emacs > will run the loop all day. It is a well-known fact that inserting Fgarbage_collect in various random places can cause bugs. But expecting every Emacs C-level hacker to write code that will endure such testing is impractical. We routinely let much more easily-spotted blunders slip though. The sheer number of subtleties and factoids you need to keep in mind when writing safe code in Emacs is already inhumanly large. We only get away because there are many places where GC cannot happen. Admittedly, with the proliferation of calls into Lisp, there's less and less of these places each year.