From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Feb 2025 10:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 76546@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17404793651480 (code B ref -1); Tue, 25 Feb 2025 10:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2025 10:29:25 +0000 Received: from localhost ([127.0.0.1]:44941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmsBo-0000No-Ew for submit@debbugs.gnu.org; Tue, 25 Feb 2025 05:29:24 -0500 Received: from lists.gnu.org ([2001:470:142::17]:58212) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmsBl-0000NO-W5 for submit@debbugs.gnu.org; Tue, 25 Feb 2025 05:29:22 -0500 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 1tmsBf-0000sm-Pe for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2025 05:29:15 -0500 Received: from mailrelay6-1.pub.mailoutpod2-cph3.one.com ([46.30.211.181]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tmsBc-0002da-WD for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2025 05:29:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1740479278; x=1741084078; d=cvj.se; s=rsa2; h=content-transfer-encoding:content-type:subject:from:to:mime-version:date: message-id:from; bh=rWRmPA3x/3bijhtMvGC+n0EAOg8aaIojXtrPxSpjqTs=; b=N0zWqpMlAca047kmbcoN5tzVPSS9cjwmtCLVMMId3XTy0ioSrB7/O0ddTahkbbIUXXoAf2wVem4ll R3FzF3rneHEAduYFgIPmNmxnAtJ7g0JgSgLblmn+u62UpBMavo0XDCsRpF02qPMuRdJukE8S9Gfq8X m/WrDteNKaHRr1MisR7e4CRwudaARe+8ZfKP6llMcdHgZgZBSELVtDO2I/QytzTBKKsSWEI6zZyOLH hjQCgmQdQYbeaUgC7iiO2KuK4iKB5tK+TLQEtxho+OOkjjX0rYGstAmXx6nuFkblsqXa+qFd0bZWsT LLt87e3domxZywXYPoc/f1yBvROzokw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1740479278; x=1741084078; d=cvj.se; s=ed2; h=content-transfer-encoding:content-type:subject:from:to:mime-version:date: message-id:from; bh=rWRmPA3x/3bijhtMvGC+n0EAOg8aaIojXtrPxSpjqTs=; b=BRvYXK2+YomgHTtWrIOTCKlAcp8LBh303SHgKpg0haAZVGTXnkfry8Qtv+lh1q7dbEVZU9v+1GixH C9pMAQcBQ== X-HalOne-ID: 2e97cd77-f363-11ef-9766-15d104443858 Received: from [192.168.50.197] (c-84-217-183-19.bbcust.telenor.se [84.217.183.19]) by mailrelay6.pub.mailoutpod2-cph3.one.com (Halon) with ESMTPSA id 2e97cd77-f363-11ef-9766-15d104443858; Tue, 25 Feb 2025 10:27:58 +0000 (UTC) Message-ID: <07eb92db-3c36-4db4-94e3-633b05f31f1b@cvj.se> Date: Tue, 25 Feb 2025 11:27:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Christian Johansson Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: none client-ip=46.30.211.181; envelope-from=christian@cvj.se; helo=mailrelay6-1.pub.mailoutpod2-cph3.one.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello! There is something fishy going on, but it is a very slippery bug, I have trouble reproducing it but it started to happen when native compilation was introduced and it has significantly gotten worse with Emacs 30, I never happened before native-compilation was introduced. Maybe you can give me some tips in building a reproducible test case? I will try to explain what happens. So prior to Emacs 30 there was only one bug I stumbled upon: 1. When a lambda is stored in a variable in a lexical scoped file it stores a closure. After some time when native compilation has done its magic on the variable you will get an error when you try to output it like this: (format "%S" my-native-compiled-variable) and Emacs crashes. This happened every time my parser-generator library ran for a long time and then tried to output a parser file. The only solution to this was to not byte-compile the file that contained the lambdas that was later supposed to be printed to a file, this solution worked but it was a workaround due to this bug. 2. After Emacs 30 it seems to corrupt strings with escape sequences inside lambdas inside variables, like this: (setq my-lambda (lambda() (looking-at "<\\?="))) After native-compilation has performed its magic on the variable the function body will become corrupted and it will become a invalid function body. This happens now to my major my phps-mode, I have reproduced the error on two machines with Emacs 30 and it has never occurred before Emacs 30 and there has been no recent changes to the plugin. If I just eval the function files anew the problem disappears so it only happens in compiled files. It however does not happen in byte-compiled files, only in native compiled files. Kind regards Christian From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Feb 2025 12:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson , Andrea Corallo Cc: 76546@debbugs.gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174057382828211 (code B ref 76546); Wed, 26 Feb 2025 12:44:01 +0000 Received: (at 76546) by debbugs.gnu.org; 26 Feb 2025 12:43:48 +0000 Received: from localhost ([127.0.0.1]:51388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnGlP-0007Kw-Dp for submit@debbugs.gnu.org; Wed, 26 Feb 2025 07:43:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35840) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnGlI-0007Kb-SB for 76546@debbugs.gnu.org; Wed, 26 Feb 2025 07:43:44 -0500 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 1tnGlB-0003op-Hm; Wed, 26 Feb 2025 07:43:33 -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=Vph1IJ3BJ1rm/12D3wiUNqIWUZelNOdICzMp5lWBx68=; b=AIjfWgOw5nj+ xCTk8FB3tVUfbASoUg0FzCbxoRRmtO1/4/vjafeZLRQLukIINLzvLYTL4DwhzD+AKy/KoXuoqhQ+Q ZT/kXkKZ2Cr508/tE6/8nslRsBfAXYax/CpHjZfAKe6VtNjxW/Ush2jkpxH3xG0BfdbGCXBXqeods qabsYZTSQJ8qVHCfNMqDy+OBCUu77WNV3q5lgeYGrk7dTegZHmLdG6TjAA7Se97wvnrcI4qlx9LXL ccxBW4yHAci+LOyX8/bCJ7kXbjPUAF3WwGgz0HIVGuBYH/6DZsKg9C7tlEU7J5Wv2N75rmsZHJ8n8 wuaR/1A1dSTMvwE/NQDX9A==; Date: Wed, 26 Feb 2025 14:43:30 +0200 Message-Id: <86eczkx4el.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <07eb92db-3c36-4db4-94e3-633b05f31f1b@cvj.se> (message from Christian Johansson on Tue, 25 Feb 2025 11:27:58 +0100) References: <07eb92db-3c36-4db4-94e3-633b05f31f1b@cvj.se> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 25 Feb 2025 11:27:58 +0100 > From: Christian Johansson > > There is something fishy going on, but it is a very slippery bug, I have > trouble reproducing it but it started to happen when native compilation > was introduced and it has significantly gotten worse with Emacs 30, I > never happened before native-compilation was introduced. > > Maybe you can give me some tips in building a reproducible test case? I > will try to explain what happens. So prior to Emacs 30 there was only > one bug I stumbled upon: > > 1. When a lambda is stored in a variable in a lexical scoped file it > stores a closure. After some time when native compilation has done its > magic on the variable you will get an error when you try to output it > like this: > (format "%S" my-native-compiled-variable) and Emacs crashes. > > This happened every time my parser-generator library ran for a long time > and then tried to output a parser file. The only solution to this was to > not byte-compile the file that contained the lambdas that was later > supposed to be printed to a file, this solution worked but it was a > workaround due to this bug. > > > 2. After Emacs 30 it seems to corrupt strings with escape sequences > inside lambdas inside variables, like this: > > (setq my-lambda (lambda() (looking-at "<\\?="))) > > After native-compilation has performed its magic on the variable the > function body will become corrupted and it will become a invalid > function body. This happens now to my major my phps-mode, I have > reproduced the error on two machines with Emacs 30 and it has never > occurred before Emacs 30 and there has been no recent changes to the > plugin. If I just eval the function files anew the problem disappears so > it only happens in compiled files. It however does not happen in > byte-compiled files, only in native compiled files. Andrea, any comments or suggestions? From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Feb 2025 20:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 76546@debbugs.gnu.org, Andrea Corallo Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174060335032022 (code B ref 76546); Wed, 26 Feb 2025 20:56:01 +0000 Received: (at 76546) by debbugs.gnu.org; 26 Feb 2025 20:55:50 +0000 Received: from localhost ([127.0.0.1]:55696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnORa-0008KP-2R for submit@debbugs.gnu.org; Wed, 26 Feb 2025 15:55:50 -0500 Received: from mailrelay6-1.pub.mailoutpod3-cph3.one.com ([2a02:2350:5:425::1]:39823) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnORV-0008K8-B2 for 76546@debbugs.gnu.org; Wed, 26 Feb 2025 15:55:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1740603339; x=1741208139; d=cvj.se; s=rsa2; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version:from: content-transfer-encoding:content-type:from; bh=HgiwMM1MO8lHaKdVnuS/OMJFxgxMw+Ac+N+72cmvvgU=; b=Wa4aCI34yh3k9EX0fzoDDinwxA2up/U718CKj+KOAGivPdZqGoGCiBHsKZyzppE1LztOL1lKhg7Rf vWczjogrWBOEuCVpR2SA1j/MC0MqtNlz3rIMGjdTsJqxXUA5FmiEHaq39uX0jymeFEJwzd+NLAcCr+ tTn2Ye9XuXHs/473LC3Lu0NPnFBdbkf8KSzGwXe+mUlw77pntkgp53GQ37HOX7gM7JBLx7sPD56BPA 1Wo69Eb2uaenCSei7qwswJqlCFfuG2+fwIRqGTeUR7FfV3M8MGA3Ud0BW96N7aIfZtqFopz7PdHB+N 57sk8u+AjTGqanOn91Jot0ao3Opa0kA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1740603339; x=1741208139; d=cvj.se; s=ed2; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version:from: content-transfer-encoding:content-type:from; bh=HgiwMM1MO8lHaKdVnuS/OMJFxgxMw+Ac+N+72cmvvgU=; b=5wTzICiwNsDuyTZQzlrFOAPxDJ0YnV1lasDSknVAK7sxUu44XYKg9QV+Mdpo3YTe1ler4xltEmaFv RDNegeeDQ== X-HalOne-ID: 0854895d-f484-11ef-b680-417246ffdc90 Received: from smtpclient.apple (c-84-217-183-19.bbcust.telenor.se [84.217.183.19]) by mailrelay6.pub.mailoutpod3-cph3.one.com (Halon) with ESMTPSA id 0854895d-f484-11ef-b680-417246ffdc90; Wed, 26 Feb 2025 20:55:38 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Christian Johansson Mime-Version: 1.0 (1.0) Date: Wed, 26 Feb 2025 21:55:28 +0100 Message-Id: References: <86eczkx4el.fsf@gnu.org> In-Reply-To: <86eczkx4el.fsf@gnu.org> X-Mailer: iPhone Mail (22D72) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Today the error disappeared on both machines without any changes in code, it= makes no sense really but if I could trigger native compilation I could do s= ome testing back and forth. It can be a issue with the garbage collection me= chanism also, the things could be dependent on each other as well. Maybe onl= y native compiled + byte compiled + garbage collected variables get corrupte= d sometimes? Non reproducible bugs that only happen after a significant period of time.. v= ariable data gets corrupted, that is at least true Kind Regards Christian > On 26 Feb 2025, at 14:03, Eli Zaretskii wrote: >=20 > =EF=BB=BF >>=20 >> Date: Tue, 25 Feb 2025 11:27:58 +0100 >> From: Christian Johansson >>=20 >> There is something fishy going on, but it is a very slippery bug, I have >> trouble reproducing it but it started to happen when native compilation >> was introduced and it has significantly gotten worse with Emacs 30, I >> never happened before native-compilation was introduced. >>=20 >> Maybe you can give me some tips in building a reproducible test case? I >> will try to explain what happens. So prior to Emacs 30 there was only >> one bug I stumbled upon: >>=20 >> 1. When a lambda is stored in a variable in a lexical scoped file it >> stores a closure. After some time when native compilation has done its >> magic on the variable you will get an error when you try to output it >> like this: >> (format "%S" my-native-compiled-variable) and Emacs crashes. >>=20 >> This happened every time my parser-generator library ran for a long time >> and then tried to output a parser file. The only solution to this was to >> not byte-compile the file that contained the lambdas that was later >> supposed to be printed to a file, this solution worked but it was a >> workaround due to this bug. >>=20 >>=20 >> 2. After Emacs 30 it seems to corrupt strings with escape sequences >> inside lambdas inside variables, like this: >>=20 >> (setq my-lambda (lambda() (looking-at "<\\?=3D"))) >>=20 >> After native-compilation has performed its magic on the variable the >> function body will become corrupted and it will become a invalid >> function body. This happens now to my major my phps-mode, I have >> reproduced the error on two machines with Emacs 30 and it has never >> occurred before Emacs 30 and there has been no recent changes to the >> plugin. If I just eval the function files anew the problem disappears so >> it only happens in compiled files. It however does not happen in >> byte-compiled files, only in native compiled files. >=20 > Andrea, any comments or suggestions? From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 08:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 76546@debbugs.gnu.org, acorallo@gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174064343025977 (code B ref 76546); Thu, 27 Feb 2025 08:04:02 +0000 Received: (at 76546) by debbugs.gnu.org; 27 Feb 2025 08:03:50 +0000 Received: from localhost ([127.0.0.1]:57885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnYs1-0006kv-Jp for submit@debbugs.gnu.org; Thu, 27 Feb 2025 03:03:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40452) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnYry-0006kf-No for 76546@debbugs.gnu.org; Thu, 27 Feb 2025 03:03:47 -0500 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 1tnYrr-00012F-Kx; Thu, 27 Feb 2025 03:03:39 -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=uiwPtzNF7+R951qnkmBlxX6fEbOsuNJVN7PY0gxxmww=; b=WEAw8f3ttap2 pYrBgJtSRcv4RaOX3ry+lOxSP10xov+jHv0ZhjT7/lMwHy3OLVnGV8YSSzoQGpW/z9h4eyrYSotQW ZZYbqRw9q8FuQL5NCEHjyiE+RWv8FhPgomycoWy1jfXxb2yxqKvNkUPo2tFujmzQzjhDRdKR1WNjT a/tSMyjlGY1n1qJ+FcBNSwwCIUB2DEcCkPuiSeifRJUewtOBgY8cJOcwus7Q7VKfw5Cd94VexBIPr 6k42m6feJm+oJcNZp4fW9SrghmLiRkA9noAMhtw6Iey8wyGN9RtrBXsnKpczE3BUMSiReUexPTnMR zObydmUbAiTakCfZTZWkTQ==; Date: Thu, 27 Feb 2025 10:02:41 +0200 Message-Id: <864j0fvmqm.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Christian Johansson on Wed, 26 Feb 2025 21:55:28 +0100) References: <86eczkx4el.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Christian Johansson > Date: Wed, 26 Feb 2025 21:55:28 +0100 > Cc: Andrea Corallo , 76546@debbugs.gnu.org > > Today the error disappeared on both machines without any changes in code, it makes no sense really but if I could trigger native compilation I could do some testing back and forth. It can be a issue with the garbage collection mechanism also, the things could be dependent on each other as well. Maybe only native compiled + byte compiled + garbage collected variables get corrupted sometimes? If you need a way to trigger native compilation, then removing the corresponding .eln file(s) should do it. From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Apr 2025 10:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Christian Johansson , 76546@debbugs.gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174462476428936 (code B ref 76546); Mon, 14 Apr 2025 10:00:03 +0000 Received: (at 76546) by debbugs.gnu.org; 14 Apr 2025 09:59:24 +0000 Received: from localhost ([127.0.0.1]:45860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4Gb5-0007We-FP for submit@debbugs.gnu.org; Mon, 14 Apr 2025 05:59:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35860) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4Gb3-0007WQ-TK for 76546@debbugs.gnu.org; Mon, 14 Apr 2025 05:59:22 -0400 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 1u4Gaw-0003ej-QL; Mon, 14 Apr 2025 05:59:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=P1KoU24bZqObAQIFecJnxMYTra0Z8ajHOmCMU0y8PKc=; b=r350BEh0SStdvEavW8yj mwdjSDUReeIuIasIvt5yh0R0GQ+ZIvGBWl4kz2H31eATI4JPEADMbOJ/oH0lxDvrpMdCPeVs0TaQx 8Rkh6kWTeNk9VJoYIuSZ8p0l8Mo/MOCu6mTxrsW8QZiwNwd39zGh84ZBGGSkePBuPkqvccwDTOUDI a6RZqRoYaxk8UZhw4E8/Ih+a0IglcGfSQ1SeUkBhRmZMOw0qLM0m0Y/vHqslsvZlNL9tjPsWumvgf Tt1YclCYbe7cr3gTr9gMc/8xet2sH/GCgkOIGyWxACsH9lsRxLnqHo7MY98F30evqHGa7I+uXihrb TRxrporK1KwexA==; Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1u4Gav-0007Gw-BG; Mon, 14 Apr 2025 05:59:13 -0400 From: Andrea Corallo In-Reply-To: <86eczkx4el.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Feb 2025 14:43:30 +0200") References: <07eb92db-3c36-4db4-94e3-633b05f31f1b@cvj.se> <86eczkx4el.fsf@gnu.org> Date: Mon, 14 Apr 2025 05:59:13 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> Date: Tue, 25 Feb 2025 11:27:58 +0100 >> From: Christian Johansson >> >> There is something fishy going on, but it is a very slippery bug, I have >> trouble reproducing it but it started to happen when native compilation >> was introduced and it has significantly gotten worse with Emacs 30, I >> never happened before native-compilation was introduced. >> >> Maybe you can give me some tips in building a reproducible test case? I >> will try to explain what happens. So prior to Emacs 30 there was only >> one bug I stumbled upon: >> >> 1. When a lambda is stored in a variable in a lexical scoped file it >> stores a closure. After some time when native compilation has done its >> magic on the variable you will get an error when you try to output it >> like this: >> (format "%S" my-native-compiled-variable) and Emacs crashes. >> >> This happened every time my parser-generator library ran for a long time >> and then tried to output a parser file. The only solution to this was to >> not byte-compile the file that contained the lambdas that was later >> supposed to be printed to a file, this solution worked but it was a >> workaround due to this bug. >> >> >> 2. After Emacs 30 it seems to corrupt strings with escape sequences >> inside lambdas inside variables, like this: >> >> (setq my-lambda (lambda() (looking-at "<\\?="))) >> >> After native-compilation has performed its magic on the variable the >> function body will become corrupted and it will become a invalid >> function body. This happens now to my major my phps-mode, I have >> reproduced the error on two machines with Emacs 30 and it has never >> occurred before Emacs 30 and there has been no recent changes to the >> plugin. If I just eval the function files anew the problem disappears so >> it only happens in compiled files. It however does not happen in >> byte-compiled files, only in native compiled files. > > Andrea, any comments or suggestions? I can't reproduce this on master. I've: test.el: ====== ;; -*- lexical-binding: t -*- (setq my-lambda (lambda() (looking-at "<\\?="))) ====== If I run emacs: $ emacs --batch -eval '(progn (load (native-compile "/home/andcor03/test/test.el")) (funcall my-lambda))' Seems to work for me. Not sure if the reproducer should be something different tho. Andrea From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Apr 2025 07:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: 76546@debbugs.gnu.org, Eli Zaretskii Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174470390822673 (code B ref 76546); Tue, 15 Apr 2025 07:59:02 +0000 Received: (at 76546) by debbugs.gnu.org; 15 Apr 2025 07:58:28 +0000 Received: from localhost ([127.0.0.1]:50411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4bBb-0005td-Tw for submit@debbugs.gnu.org; Tue, 15 Apr 2025 03:58:28 -0400 Received: from mailrelay3-1.pub.mailoutpod3-cph3.one.com ([2a02:2350:5:422::1]:38319) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4bBY-0005tL-IY for 76546@debbugs.gnu.org; Tue, 15 Apr 2025 03:58:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1744703898; x=1745308698; d=cvj.se; s=rsa2; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version:from: content-transfer-encoding:content-type:from; bh=Yz20cn/GY2eqd0Fp6RhWudKGE90ZLsUMVTppoQrql5I=; b=o/+YgXaO0I2jw0N4xVSpiCdzACE/jAjN7xnW96nxD5rgLK8ADxRHZGIG8APTh0yr47m2Xu69t6Efj HStKIKFUqduYVetbQJ3YwRfoYi7H00uzwHIGr7GBQV2TXyDxy1e2Hh0d9onAvZTt8RPYm/dVhSbuQe miNV4V/p48+oUrlCx5Q3sIn+ZOB1qHH1KhbVfTcYSvtSOhj2ufweOomemKdBeUZ3ZnNzxJd/kR3Ufc 98IyAQUF3kLU2CJRjcyEVKikDycPcNGmhoMKgcC+NAoeQkoSUohEvRI+whr5a+iwa2yde8BVqRF0E0 HFqYQfWlXVHd/T+jVN0fb0A3AtM1d/A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1744703898; x=1745308698; d=cvj.se; s=ed2; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version:from: content-transfer-encoding:content-type:from; bh=Yz20cn/GY2eqd0Fp6RhWudKGE90ZLsUMVTppoQrql5I=; b=Q99P12HB66p3G7icLesNJdKqoeODX8h63unQym6VPsrP4tr3dEvymdSqhXgWpE6enI81RB1zj57GA HXk1KJQDQ== X-HalOne-ID: 63cccd6a-19cf-11f0-8a3c-2b8368a4d5c5 Received: from smtpclient.apple (c-84-217-176-184.bbcust.telenor.se [84.217.176.184]) by mailrelay3.pub.mailoutpod3-cph3.one.com (Halon) with ESMTPSA id 63cccd6a-19cf-11f0-8a3c-2b8368a4d5c5; Tue, 15 Apr 2025 07:58:17 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Christian Johansson Mime-Version: 1.0 (1.0) Date: Tue, 15 Apr 2025 09:58:07 +0200 Message-Id: <36576F50-535B-48D3-BEDD-D9E153C31536@cvj.se> References: In-Reply-To: X-Mailer: iPhone Mail (22D82) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi The initial issue disappeared by itself without any updates to software, it s= tarted to happen after Emacs upgrade on two different machines but resolved i= tself. Must be something related to corrupt storage of byte compiled or nati= ve compiled code I have not encountered the issue since but other strange issues like keymap r= ebinding after some time in a Emacs session I have one issue that is reproducible but only after a couple of days of Ema= cs running and exahausting the memory, in that case the lambda stored in var= iable becomes binary and printing it crashes Emacs Regards Christian > Andrea Corallo kirjoitti 2025-04-14 kello 12.15: >=20 > =EF=BB=BFEli Zaretskii writes: >=20 >>> Date: Tue, 25 Feb 2025 11:27:58 +0100 >>> From: Christian Johansson >>>=20 >>> There is something fishy going on, but it is a very slippery bug, I have= >>> trouble reproducing it but it started to happen when native compilation >>> was introduced and it has significantly gotten worse with Emacs 30, I >>> never happened before native-compilation was introduced. >>>=20 >>> Maybe you can give me some tips in building a reproducible test case? I >>> will try to explain what happens. So prior to Emacs 30 there was only >>> one bug I stumbled upon: >>>=20 >>> 1. When a lambda is stored in a variable in a lexical scoped file it >>> stores a closure. After some time when native compilation has done its >>> magic on the variable you will get an error when you try to output it >>> like this: >>> (format "%S" my-native-compiled-variable) and Emacs crashes. >>>=20 >>> This happened every time my parser-generator library ran for a long time= >>> and then tried to output a parser file. The only solution to this was to= >>> not byte-compile the file that contained the lambdas that was later >>> supposed to be printed to a file, this solution worked but it was a >>> workaround due to this bug. >>>=20 >>>=20 >>> 2. After Emacs 30 it seems to corrupt strings with escape sequences >>> inside lambdas inside variables, like this: >>>=20 >>> (setq my-lambda (lambda() (looking-at "<\\?=3D"))) >>>=20 >>> After native-compilation has performed its magic on the variable the >>> function body will become corrupted and it will become a invalid >>> function body. This happens now to my major my phps-mode, I have >>> reproduced the error on two machines with Emacs 30 and it has never >>> occurred before Emacs 30 and there has been no recent changes to the >>> plugin. If I just eval the function files anew the problem disappears so= >>> it only happens in compiled files. It however does not happen in >>> byte-compiled files, only in native compiled files. >>=20 >> Andrea, any comments or suggestions? >=20 > I can't reproduce this on master. I've: >=20 > test.el: > =3D=3D=3D=3D=3D=3D > ;; -*- lexical-binding: t -*- = =20 > (setq my-lambda (lambda() (looking-at "<\\?=3D"))) > =3D=3D=3D=3D=3D=3D >=20 > If I run emacs: > $ emacs --batch -eval '(progn (load (native-compile "/home/andcor03/test/t= est.el")) (funcall my-lambda))' >=20 > Seems to work for me. Not sure if the reproducer should be something > different tho. >=20 > Andrea From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Apr 2025 08:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 76546@debbugs.gnu.org, acorallo@gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.17447063349766 (code B ref 76546); Tue, 15 Apr 2025 08:39:01 +0000 Received: (at 76546) by debbugs.gnu.org; 15 Apr 2025 08:38:54 +0000 Received: from localhost ([127.0.0.1]:50564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4bok-0002XS-2A for submit@debbugs.gnu.org; Tue, 15 Apr 2025 04:38:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59908) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4boh-0002XA-04 for 76546@debbugs.gnu.org; Tue, 15 Apr 2025 04:38:51 -0400 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 1u4boX-0005Tt-HK; Tue, 15 Apr 2025 04:38:41 -0400 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=TcJT8vLSIjC864e45FlcURFk+6oO1R9zmAgqL6BznaE=; b=draJDg2TTXsG B30ZH5TOp/3CkgVguGApDuOX7oxZ3rAUYiLm9vqFLrk/2cD0kBlzUAPrj+7ECEeOeT4j0fUwsDhcu CKX7s7VjWIX4Bm+5aZVmPKpPAmwJXBqbOOpo8dvnEPPiABbDVq2H/ErjmYMbasLMh+pZKqHZVkb4j wU4kCJWNHpP6ZKu6/U/rUj8IYz3WLvFvOqiHbG3fGI06hfPmuBj/3ohGk0SrSDQQ5tfYniCkF6GR1 GOQq1eVbCI6kEbxsEIpiCzn9fOKZISWx/qcvNus7LG419O+mSjDkCuyaM+uIkyzAydRoA81JC2zJe 2X6P3ifm9anmyVs7+XE6Uw==; Date: Tue, 15 Apr 2025 11:38:34 +0300 Message-Id: <86tt6phl9x.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <36576F50-535B-48D3-BEDD-D9E153C31536@cvj.se> (message from Christian Johansson on Tue, 15 Apr 2025 09:58:07 +0200) References: <36576F50-535B-48D3-BEDD-D9E153C31536@cvj.se> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Christian Johansson > Date: Tue, 15 Apr 2025 09:58:07 +0200 > Cc: Eli Zaretskii , 76546@debbugs.gnu.org > > I have one issue that is reproducible but only after a couple of days of Emacs running and exahausting the memory, in that case the lambda stored in variable becomes binary and printing it crashes Emacs If the value cannot be printed, how do you know that it is binary? Could you perhaps run Emacs under GDB, so that when this happens, you could show the value and perhaps invoke some other commands we would like you to try and show the results? From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Apr 2025 11:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: christian@cvj.se Cc: 76546@debbugs.gnu.org, acorallo@gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174566795320933 (code B ref 76546); Sat, 26 Apr 2025 11:46:02 +0000 Received: (at 76546) by debbugs.gnu.org; 26 Apr 2025 11:45:53 +0000 Received: from localhost ([127.0.0.1]:58894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8dyi-0005RZ-Vm for submit@debbugs.gnu.org; Sat, 26 Apr 2025 07:45:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52882) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8dyh-0005RH-Em for 76546@debbugs.gnu.org; Sat, 26 Apr 2025 07:45:51 -0400 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 1u8dya-0001jD-23; Sat, 26 Apr 2025 07:45:44 -0400 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=W9634ork/FaUdA2SVpPbyfAkHXmKGDZS4YoVkCCICA0=; b=QjTd6TDTO3rd XnMu8kkw1kNj/QKpMweQJUXnwO5WE6R9I6nCgKE5nnIO/ncZIR+QMIf48y3GU3ZSm2ogNemSW6NtF tcC+pviEei2+8UQUSr5RuDLqE4oMzr0uabIM7UQa8aROYeD+AFFCzJHZjLVE8oZEMhXAi9ytAnsaR 9xZ5uxLSqKyo8P+zj2tpTfOoHQUFMyQj6vQdycCaLLWoYN0d5iXcI8LADuHS/ulalTMalX4gr94ZL 8C/RhfBcnOTsCxtjp1Nn5TOaeI/eGgYGup9ec46bHtc3tpv21dtuT/ez1qZZBtAngf8vzqgdphKYk T2/gs+BRO7JBlHeU6B2ZnQ==; Date: Sat, 26 Apr 2025 14:45:41 +0300 Message-Id: <865xiruowq.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <86tt6phl9x.fsf@gnu.org> (message from Eli Zaretskii on Tue, 15 Apr 2025 11:38:34 +0300) References: <36576F50-535B-48D3-BEDD-D9E153C31536@cvj.se> <86tt6phl9x.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 76546@debbugs.gnu.org, acorallo@gnu.org > Date: Tue, 15 Apr 2025 11:38:34 +0300 > From: Eli Zaretskii > > > From: Christian Johansson > > Date: Tue, 15 Apr 2025 09:58:07 +0200 > > Cc: Eli Zaretskii , 76546@debbugs.gnu.org > > > > I have one issue that is reproducible but only after a couple of days of Emacs running and exahausting the memory, in that case the lambda stored in variable becomes binary and printing it crashes Emacs > > If the value cannot be printed, how do you know that it is binary? > > Could you perhaps run Emacs under GDB, so that when this happens, you > could show the value and perhaps invoke some other commands we would > like you to try and show the results? Ping! Any further information or progress with this? From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Apr 2025 13:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 76546@debbugs.gnu.org, acorallo@gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174567296918977 (code B ref 76546); Sat, 26 Apr 2025 13:10:02 +0000 Received: (at 76546) by debbugs.gnu.org; 26 Apr 2025 13:09:29 +0000 Received: from localhost ([127.0.0.1]:59362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8fHc-0004vz-UW for submit@debbugs.gnu.org; Sat, 26 Apr 2025 09:09:29 -0400 Received: from mailrelay2-1.pub.mailoutpod3-cph3.one.com ([2a02:2350:5:421::1]:33903) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8fHY-0004vQ-Gd for 76546@debbugs.gnu.org; Sat, 26 Apr 2025 09:09:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1745672958; x=1746277758; d=cvj.se; s=rsa2; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version:from: content-transfer-encoding:content-type:from; bh=SXbTsELxgYgoYg1pJChzjqXRMxu2hw3NlKl9kOGkE4Y=; b=QFa69Bp/VY+E4gOnoICFgGBIYNrc/T5nmSMvU7HZn6KEgRfuyFb4l8Qii6II2nVCDPVddLqRaj6f0 b0GrtEhqMTCRgwOHoUjFtM3qzacHuPw9Hrtp7gABJW45RxTD9UupQasfU5oFSWG7yw3gq6Ikld+Zhm PSMwnJSMDitOhqupdc1ieS6B8gl4lhTruy52r3/oTKzdSgRAJ1kvqRf6cZuBL9DZ+E49HNhu/DBJO8 WAskreoxrObmClEQm5ClfzI1KRTBzLm6KZh6AeCW2z39dE5C4lOHjP6aUoonITlasaeKPzLAnrq7pd CKofIwA4o5VYtVITtYENtdow6oBnibQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1745672958; x=1746277758; d=cvj.se; s=ed2; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version:from: content-transfer-encoding:content-type:from; bh=SXbTsELxgYgoYg1pJChzjqXRMxu2hw3NlKl9kOGkE4Y=; b=mEV0W4b/xIKywe3PfBdGcQKOO4mn+qMYFb5ZBAdM7pMYMR7ywwuR45Vex9JSEgWHR2Zv10CKis5Mj IZrYTTfAQ== X-HalOne-ID: a7feec0a-229f-11f0-abd0-b37c246f863f Received: from smtpclient.apple (c-84-217-176-184.bbcust.telenor.se [84.217.176.184]) by mailrelay2.pub.mailoutpod3-cph3.one.com (Halon) with ESMTPSA id a7feec0a-229f-11f0-abd0-b37c246f863f; Sat, 26 Apr 2025 13:09:18 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Christian Johansson Mime-Version: 1.0 (1.0) Date: Sat, 26 Apr 2025 15:09:07 +0200 Message-Id: References: <865xiruowq.fsf@gnu.org> In-Reply-To: <865xiruowq.fsf@gnu.org> X-Mailer: iPhone Mail (22D82) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Yes maybe, it was apparent from the error message that the function had unex= pected data and trying to print it crashed Emacs.. I will check for an old l= og But this error has been present for many years so it is not a new thing, I s= olved it by not byte compilling some files > Eli Zaretskii kirjoitti 2025-04-26 kello 13.45: >=20 > =EF=BB=BF >>=20 >> Cc: 76546@debbugs.gnu.org, acorallo@gnu.org >> Date: Tue, 15 Apr 2025 11:38:34 +0300 >> From: Eli Zaretskii >>=20 >>> From: Christian Johansson >>> Date: Tue, 15 Apr 2025 09:58:07 +0200 >>> Cc: Eli Zaretskii , 76546@debbugs.gnu.org >>>=20 >>> I have one issue that is reproducible but only after a couple of days of= Emacs running and exahausting the memory, in that case the lambda stored in= variable becomes binary and printing it crashes Emacs >>=20 >> If the value cannot be printed, how do you know that it is binary? >>=20 >> Could you perhaps run Emacs under GDB, so that when this happens, you >> could show the value and perhaps invoke some other commands we would >> like you to try and show the results? >=20 > Ping! Any further information or progress with this? From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 May 2025 09:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson , acorallo@gnu.org Cc: 76546@debbugs.gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174686949920781 (code B ref 76546); Sat, 10 May 2025 09:32:01 +0000 Received: (at 76546) by debbugs.gnu.org; 10 May 2025 09:31:39 +0000 Received: from localhost ([127.0.0.1]:43912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDgYU-0005P1-51 for submit@debbugs.gnu.org; Sat, 10 May 2025 05:31:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56120) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uDgYR-0005Ol-2I for 76546@debbugs.gnu.org; Sat, 10 May 2025 05:31:35 -0400 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 1uDgYJ-0001aq-RA; Sat, 10 May 2025 05:31:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=0IaIzHJOhFMfZ7ObW0kaENqN2tO4fsgLm1OZaNZrNsU=; b=MBFT9W9ttOPMgNRC/umw kAP0tD8KiZ6e4ACUx260FZ9N/BWSCVbZHDuhU+gqHl6XmWI5HKfNuUYT+BNtDaeI/kzpieW+TTKs4 qCVMT1u2T4TC3wJyN1BSmTgCtHb3eZUL2u0SWPc+IKvfysysp/+XZsJ790hRy25K48X6YLp3IiG3g sejfqJJgFqRJ1mSrJMkcqSMw6z7vL0T62PZGXWnATWLbV196T6Ni9XjMXw5eqyomgAEiePon6IzL+ dqEftrUyIi0gIRru5ha+TTt4ruh2LFDVUNTpqGOOiMyalD8eiWSWTlugygtKq14BSwwcCaAc4KXH3 hCQ3si2NTDEcfA==; Date: Sat, 10 May 2025 12:31:24 +0300 Message-Id: <867c2obymr.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Christian Johansson on Sat, 26 Apr 2025 15:09:07 +0200) References: <865xiruowq.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! Any further information or ideas that could allow us to make progress here? > From: Christian Johansson > Date: Sat, 26 Apr 2025 15:09:07 +0200 > Cc: 76546@debbugs.gnu.org, acorallo@gnu.org > > Yes maybe, it was apparent from the error message that the function had unexpected data and trying to print it crashed Emacs.. I will check for an old log > > But this error has been present for many years so it is not a new thing, I solved it by not byte compilling some files > > > Eli Zaretskii kirjoitti 2025-04-26 kello 13.45: > > > >  > >> > >> Cc: 76546@debbugs.gnu.org, acorallo@gnu.org > >> Date: Tue, 15 Apr 2025 11:38:34 +0300 > >> From: Eli Zaretskii > >> > >>> From: Christian Johansson > >>> Date: Tue, 15 Apr 2025 09:58:07 +0200 > >>> Cc: Eli Zaretskii , 76546@debbugs.gnu.org > >>> > >>> I have one issue that is reproducible but only after a couple of days of Emacs running and exahausting the memory, in that case the lambda stored in variable becomes binary and printing it crashes Emacs > >> > >> If the value cannot be printed, how do you know that it is binary? > >> > >> Could you perhaps run Emacs under GDB, so that when this happens, you > >> could show the value and perhaps invoke some other commands we would > >> like you to try and show the results? > > > > Ping! Any further information or progress with this? > From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 May 2025 04:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , acorallo@gnu.org Cc: 76546@debbugs.gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174728204715873 (code B ref 76546); Thu, 15 May 2025 04:08:01 +0000 Received: (at 76546) by debbugs.gnu.org; 15 May 2025 04:07:27 +0000 Received: from localhost ([127.0.0.1]:48950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uFPsU-00047w-Mc for submit@debbugs.gnu.org; Thu, 15 May 2025 00:07:27 -0400 Received: from mailrelay1-1.pub.mailoutpod2-cph3.one.com ([2a02:2350:5:400::1]:36917) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uFPsQ-00047B-Co for 76546@debbugs.gnu.org; Thu, 15 May 2025 00:07:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1747282036; x=1747886836; d=cvj.se; s=rsa2; h=content-transfer-encoding:content-type:in-reply-to:from:references:cc:to: subject:mime-version:date:message-id:from; bh=k7mf+0gydV9XoyO8rpQYpXURmg6pn99ZoVCjZMVwxPc=; b=a1dfSNJktYQwYSnUm7N/yVSDIDyh3wK06VArwEZ/EcvqGR99t9v8GXtdcXRTzGfv9H+UVC8QFlwbE 5GEckqJaGS3PsEharl8Ju0izRKGgQkCdIxr8VlGkhmLxCBafwpskZo41/jgnNXw+eDg585WIlmVm5k Q20VanhlzAMlaaTZwHlV4GyBG3zmLcCyYNbnZSovXYCSiLFe9NBhwVeXc4rvnEgGDz9n369lh7EUa8 R6OoA223RPGas+r8iytlDRDlBoDnHnugg1GMHEc2JDydhdQCOgfjkqcv9lmlMAv7akWXN9+iwMb66i YEW6h0MnAf3awMiN+otsb1ids9ru2lQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1747282036; x=1747886836; d=cvj.se; s=ed2; h=content-transfer-encoding:content-type:in-reply-to:from:references:cc:to: subject:mime-version:date:message-id:from; bh=k7mf+0gydV9XoyO8rpQYpXURmg6pn99ZoVCjZMVwxPc=; b=AmfJHl79pko5kjRHVg2VNV6IO62HMbsm8Wm0Q1PKwUUXD7Y0PjwX57wC/WKV5r2mLHCz2da/eZ2Zx QneBpUrAg== X-HalOne-ID: 15c86a8b-3142-11f0-a7b3-4d2191f5f3b5 Received: from [192.168.50.197] (c-84-217-176-184.bbcust.telenor.se [84.217.176.184]) by mailrelay1.pub.mailoutpod2-cph3.one.com (Halon) with ESMTPSA id 15c86a8b-3142-11f0-a7b3-4d2191f5f3b5; Thu, 15 May 2025 04:07:16 +0000 (UTC) Message-ID: Date: Thu, 15 May 2025 06:07:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <865xiruowq.fsf@gnu.org> <867c2obymr.fsf@gnu.org> Content-Language: en-US From: Christian Johansson In-Reply-To: <867c2obymr.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I have a discussion with Stefan Monnier about this, this seems to be a feature and not a bug, the printing of lambdas has been limited in new Emacs version to avoid this issue I think On 5/10/25 11:31, Eli Zaretskii wrote: > Ping! Any further information or ideas that could allow us to make > progress here? > >> From: Christian Johansson >> Date: Sat, 26 Apr 2025 15:09:07 +0200 >> Cc: 76546@debbugs.gnu.org, acorallo@gnu.org >> >> Yes maybe, it was apparent from the error message that the function had unexpected data and trying to print it crashed Emacs.. I will check for an old log >> >> But this error has been present for many years so it is not a new thing, I solved it by not byte compilling some files >> >>> Eli Zaretskii kirjoitti 2025-04-26 kello 13.45: >>> >>>  >>>> Cc: 76546@debbugs.gnu.org, acorallo@gnu.org >>>> Date: Tue, 15 Apr 2025 11:38:34 +0300 >>>> From: Eli Zaretskii >>>> >>>>> From: Christian Johansson >>>>> Date: Tue, 15 Apr 2025 09:58:07 +0200 >>>>> Cc: Eli Zaretskii , 76546@debbugs.gnu.org >>>>> >>>>> I have one issue that is reproducible but only after a couple of days of Emacs running and exahausting the memory, in that case the lambda stored in variable becomes binary and printing it crashes Emacs >>>> If the value cannot be printed, how do you know that it is binary? >>>> >>>> Could you perhaps run Emacs under GDB, so that when this happens, you >>>> could show the value and perhaps invoke some other commands we would >>>> like you to try and show the results? >>> Ping! Any further information or progress with this? From unknown Tue Jun 17 01:50:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 May 2025 09:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson , Stefan Monnier Cc: 76546@debbugs.gnu.org, acorallo@gnu.org Received: via spool by 76546-submit@debbugs.gnu.org id=B76546.174747494618173 (code B ref 76546); Sat, 17 May 2025 09:43:02 +0000 Received: (at 76546) by debbugs.gnu.org; 17 May 2025 09:42:26 +0000 Received: from localhost ([127.0.0.1]:45878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGE3m-0004j3-Ev for submit@debbugs.gnu.org; Sat, 17 May 2025 05:42:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48214) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uGE3k-0004ih-5i for 76546@debbugs.gnu.org; Sat, 17 May 2025 05:42:24 -0400 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 1uGE3c-0002qm-Qn; Sat, 17 May 2025 05:42:16 -0400 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=5bS9ON4Lz0XDADIKZlG0maCKSEs/bflDeA/SoUOtFDo=; b=iMpthLK1RYOF yhyjGhg93RmHr5ZXrklXoQSdPNhsgWuzDBYD6RGImEsaZUScTWN14+cOOTDBiIJYSB/OEqDUNdJOV 0lJSVU+CkjJvPt7LzWcRPXORCpiov4W51ORcf83IRDJcGE/+BAk0Yh9SWWWcJHaE1Gus+uF9Pq2mf uVgbqymPYFtAFQ10IcRnRW9vdsHPOiyWkiL/JpFB7uycXDBQzzDysGfndpjHi4YvqlAX2cqZnojM2 7FHn9jmfQqlS7Y7k0CNGQGAxrUXEE8fLz3LqJEM5gw3+ZWY2CGoUJa2Fjh4r/B4jGT/6a7jNQxnNN kzFcrk8T5dNm99EwIaOYlQ==; Date: Sat, 17 May 2025 12:42:14 +0300 Message-Id: <8634d3wp3d.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Christian Johansson on Thu, 15 May 2025 06:07:15 +0200) References: <865xiruowq.fsf@gnu.org> <867c2obymr.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 15 May 2025 06:07:15 +0200 > Cc: 76546@debbugs.gnu.org > From: Christian Johansson > > I have a discussion with Stefan Monnier about this, this seems to be a > feature and not a bug, the printing of lambdas has been limited in new > Emacs version to avoid this issue I think Was the discussion with Stefan off-list? Stefan, should I close this bug, then? From unknown Tue Jun 17 01:50:38 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Christian Johansson Subject: bug#76546: closed (Re: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time) Message-ID: References: <07eb92db-3c36-4db4-94e3-633b05f31f1b@cvj.se> X-Gnu-PR-Message: they-closed 76546 X-Gnu-PR-Package: emacs Reply-To: 76546@debbugs.gnu.org Date: Tue, 20 May 2025 17:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1747762082-16036-1" This is a multi-part message in MIME format... ------------=_1747762082-16036-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #76546: 30.1; Native compilation is corrupting lambdas/closures stored in v= ariables after some time which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 76546@debbugs.gnu.org. --=20 76546: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76546 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1747762082-16036-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 76546-done) by debbugs.gnu.org; 20 May 2025 17:27:04 +0000 Received: from localhost ([127.0.0.1]:34547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uHQk4-00046q-Fs for submit@debbugs.gnu.org; Tue, 20 May 2025 13:27:04 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17696) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uHQk1-00045y-3M for 76546-done@debbugs.gnu.org; Tue, 20 May 2025 13:27:01 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5008E442112; Tue, 20 May 2025 13:26:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1747762014; bh=eeXeqKXAShh+9zrIoZFhRp2nA3jt4cN4ryiFLR7BJf4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FLe/ZhGFq9O2z17Nd/k2p+V0qnnCWuXaSDf+Dd5rqGxu0vYiRvCEN0sslCsQLdCZQ Mp/LTOyGjgwXR5mD1+YD17Xcyvhko3m7i0MA9XikJmoG1yyGZlYEBAutsiFGxYK7w8 RT7OiXhmjI03yvTWSaEIErj0e7DGo0dJeSsWpeiZ9ndXq3WdNEEjBpEN6LOz6BrjVf 9CYOqGL80s1lgCLDK/dbr8FzMCHFgnYUGif1MXbRC0uS2EPe5rlbugG5EvePGWLHKT WaeQzbpsB/IG8XpGIEnl5k4PU/+KKzWErYhmoNvgKIq0yKvjNA75yMCQJpus/50+r9 FTgYpAHgKel6w== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 247BF442106; Tue, 20 May 2025 13:26:54 -0400 (EDT) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0FFCF1202A2; Tue, 20 May 2025 13:26:54 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#76546: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time In-Reply-To: <8634d3wp3d.fsf@gnu.org> Message-ID: References: <865xiruowq.fsf@gnu.org> <867c2obymr.fsf@gnu.org> <8634d3wp3d.fsf@gnu.org> Date: Tue, 20 May 2025 13:26:48 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.167 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76546-done Cc: Christian Johansson , acorallo@gnu.org, 76546-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I have a discussion with Stefan Monnier about this, this seems to be a >> feature and not a bug, the printing of lambdas has been limited in new >> Emacs version to avoid this issue I think > Was the discussion with Stefan off-list? My best guess is that he's referring to https://lists.gnu.org/archive/html/emacs-devel/2025-05/msg00133.html > Stefan, should I close this bug, then? I think so, mostly because there is no actionable element in it: no clear description of what was the problem and even less info about how to reproduce it. Stefan ------------=_1747762082-16036-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Feb 2025 10:29:25 +0000 Received: from localhost ([127.0.0.1]:44941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmsBo-0000No-Ew for submit@debbugs.gnu.org; Tue, 25 Feb 2025 05:29:24 -0500 Received: from lists.gnu.org ([2001:470:142::17]:58212) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmsBl-0000NO-W5 for submit@debbugs.gnu.org; Tue, 25 Feb 2025 05:29:22 -0500 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 1tmsBf-0000sm-Pe for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2025 05:29:15 -0500 Received: from mailrelay6-1.pub.mailoutpod2-cph3.one.com ([46.30.211.181]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tmsBc-0002da-WD for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2025 05:29:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1740479278; x=1741084078; d=cvj.se; s=rsa2; h=content-transfer-encoding:content-type:subject:from:to:mime-version:date: message-id:from; bh=rWRmPA3x/3bijhtMvGC+n0EAOg8aaIojXtrPxSpjqTs=; b=N0zWqpMlAca047kmbcoN5tzVPSS9cjwmtCLVMMId3XTy0ioSrB7/O0ddTahkbbIUXXoAf2wVem4ll R3FzF3rneHEAduYFgIPmNmxnAtJ7g0JgSgLblmn+u62UpBMavo0XDCsRpF02qPMuRdJukE8S9Gfq8X m/WrDteNKaHRr1MisR7e4CRwudaARe+8ZfKP6llMcdHgZgZBSELVtDO2I/QytzTBKKsSWEI6zZyOLH hjQCgmQdQYbeaUgC7iiO2KuK4iKB5tK+TLQEtxho+OOkjjX0rYGstAmXx6nuFkblsqXa+qFd0bZWsT LLt87e3domxZywXYPoc/f1yBvROzokw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1740479278; x=1741084078; d=cvj.se; s=ed2; h=content-transfer-encoding:content-type:subject:from:to:mime-version:date: message-id:from; bh=rWRmPA3x/3bijhtMvGC+n0EAOg8aaIojXtrPxSpjqTs=; b=BRvYXK2+YomgHTtWrIOTCKlAcp8LBh303SHgKpg0haAZVGTXnkfry8Qtv+lh1q7dbEVZU9v+1GixH C9pMAQcBQ== X-HalOne-ID: 2e97cd77-f363-11ef-9766-15d104443858 Received: from [192.168.50.197] (c-84-217-183-19.bbcust.telenor.se [84.217.183.19]) by mailrelay6.pub.mailoutpod2-cph3.one.com (Halon) with ESMTPSA id 2e97cd77-f363-11ef-9766-15d104443858; Tue, 25 Feb 2025 10:27:58 +0000 (UTC) Message-ID: <07eb92db-3c36-4db4-94e3-633b05f31f1b@cvj.se> Date: Tue, 25 Feb 2025 11:27:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: bug-gnu-emacs@gnu.org From: Christian Johansson Subject: 30.1; Native compilation is corrupting lambdas/closures stored in variables after some time Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: none client-ip=46.30.211.181; envelope-from=christian@cvj.se; helo=mailrelay6-1.pub.mailoutpod2-cph3.one.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello! There is something fishy going on, but it is a very slippery bug, I have trouble reproducing it but it started to happen when native compilation was introduced and it has significantly gotten worse with Emacs 30, I never happened before native-compilation was introduced. Maybe you can give me some tips in building a reproducible test case? I will try to explain what happens. So prior to Emacs 30 there was only one bug I stumbled upon: 1. When a lambda is stored in a variable in a lexical scoped file it stores a closure. After some time when native compilation has done its magic on the variable you will get an error when you try to output it like this: (format "%S" my-native-compiled-variable) and Emacs crashes. This happened every time my parser-generator library ran for a long time and then tried to output a parser file. The only solution to this was to not byte-compile the file that contained the lambdas that was later supposed to be printed to a file, this solution worked but it was a workaround due to this bug. 2. After Emacs 30 it seems to corrupt strings with escape sequences inside lambdas inside variables, like this: (setq my-lambda (lambda() (looking-at "<\\?="))) After native-compilation has performed its magic on the variable the function body will become corrupted and it will become a invalid function body. This happens now to my major my phps-mode, I have reproduced the error on two machines with Emacs 30 and it has never occurred before Emacs 30 and there has been no recent changes to the plugin. If I just eval the function files anew the problem disappears so it only happens in compiled files. It however does not happen in byte-compiled files, only in native compiled files. Kind regards Christian ------------=_1747762082-16036-1--