From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#65455: 30.0.50; Disassemble: error with "free-standing" native compiled function Date: Fri, 25 Aug 2023 04:11:48 -0400 Message-ID: References: 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="23159"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65455@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 Fri Aug 25 10:13:16 2023 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 1qZRwR-0005mt-DL for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Aug 2023 10:13:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZRwD-0004kd-Nu; Fri, 25 Aug 2023 04:13:01 -0400 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 1qZRwA-0004eQ-7r for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 04:12:59 -0400 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 1qZRw9-0004tI-P0 for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 04:12:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZRwD-0000Ze-Ns for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 04:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2023 08:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65455 X-GNU-PR-Package: emacs Original-Received: via spool by 65455-submit@debbugs.gnu.org id=B65455.16929511242130 (code B ref 65455); Fri, 25 Aug 2023 08:13:01 +0000 Original-Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 08:12:04 +0000 Original-Received: from localhost ([127.0.0.1]:39205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZRvI-0000YH-Gn for submit@debbugs.gnu.org; Fri, 25 Aug 2023 04:12:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZRvD-0000Xk-1z for 65455@debbugs.gnu.org; Fri, 25 Aug 2023 04:12:02 -0400 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 1qZRv3-0004ka-3i; Fri, 25 Aug 2023 04:11:49 -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=6uxf/Rj4wq+encor1m3aR2SNY2KEOWSSSSYu+j09RK8=; b=awrJBWD70z3r289Czw9D ELp/ySWHaxUOYO//FjYNyp4ocp9Q7aoCoj2BjtBaWIyjtYyBhbTZk2+yPvRWScO8iRhNKEVoomSJw 6bjY0z+j/rzNm+Tk6n8+Do94NBwaUG4Kb7s9OiLytDqysWaTnUyFhHEm8+pUWwrFiaCxXeWk5sWWp zH6qYCqYB7jQWRu9ypkmLOKbDOetHT+GsyeLv0UTByQpSICwnDlFSk7Cs/gs61Q/neOQZmlJKzm5J ncSjHiyJxX9f7IDfmUr/u7RXQF/UCVtBoYgYqAyI8on1CrQeVKSDGCZY4K74wgh9JmL05PjKwbw9U e6NayGBGrJhXKg==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qZRv2-0001sb-Tt; Fri, 25 Aug 2023 04:11:48 -0400 In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Tue, 22 Aug 2023 15:17:21 +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:268412 Archived-At: Gerd M=C3=B6llmann writes: > In *scratch*, evaluate > > (defun foo (a b) > (list a b)) > > (native-compile 'foo) > (disassemble 'foo) > > This gives an error in disass.el, around line 98 that a re-search fails, > but the real error might be that, in the lines above, objdump is called > on a file that does not exist. > > Workaround is to save the function to a file, native-compile that file, > and load the resulting .eln. Then the disassemble works as expected. > > In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.6.0, NS > appkit-2299.70 Version 13.5 (Build 22G74)) of 2023-08-22 built on > Mini.fritz.box > Repository revision: fe6009795211844ae2deda602c197cb57265eb64 > Repository branch: scratch/pkg > Windowing system distributor 'Apple', version 10.3.2299 > System Description: macOS 13.5 > > Configured using: > 'configure --cache-file /Users/gerd/tmp/config.cache.pkg > --with-native-compilation --disable-silent-rules 'CFLAGS=3D-g -O0'' Hello all, okay so the issue is the following, when we try to disassemble the function we fail as the temporary eln file (that was created in /tmp) just after being loaded is deleted. I believe thei behaviour was introduced by ef6059cb8325 with the intent of not leaving temporary files around. Infact "normal disassemble" of functions belonging to .el files it's still functional and this bug affects only functions not related to a specific source file. I think we have 3 options: 1- Give up on the disassemble on this specific case 2- Do not remove the temporary eln file in /tmp and wait for the OS to do it for us. 3- Keep a list of temporary eln files we want to clean-up when Emacs exits. Bests Andrea