GNU bug report logs - #65455
30.0.50; Disassemble: error with "free-standing" native compiled function

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Gerd M├Âllmann <gerd.moellmann@HIDDEN>; dated Tue, 22 Aug 2023 13:18:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 27 Aug 2023 18:05:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 14:05:13 2023
Received: from localhost ([127.0.0.1]:46222 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaK8O-0007gy-Jb
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 14:05:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39530)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1qaK8L-0007gZ-0E
 for 65455 <at> debbugs.gnu.org; Sun, 27 Aug 2023 14:05:11 -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 <acorallo@HIDDEN>)
 id 1qaK89-0000Tx-Eg; Sun, 27 Aug 2023 14:04:57 -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=rztOHj0xIzTcMGbQfWMyfEDDeuZS3qpowSlmCRL1R+w=; b=NbonbuoHWgNENLswW11b
 SgREw9xmQAAw76AI33sa9PATFUtHfPWN4SWFVfA858mRqtuWZPPYnuaQG38WxDP/5fUd9ZZviLGgM
 TZn1SZYJ/XCcYIi2dEOU0ciywLAlf8Rm6Mrng2iftUWay0viLGdYV9D9H1tqIGo2ClMfk1E1KVkCd
 vPKLH8W39dciv4Yebxx+tXLRIN18EC7saj9mRHhpEATzoCK+nZxWJvd+lDLSGr0So1Tx2KXpJE7s/
 y00tfe/kd0ImEV+ZfDdTLubqZM+2DXdcewsRM2ZFsd+2BQ44qAE35IrrCBZ1AI8o06ucOsVBl3Gbh
 thUULfsaYz2uvA==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1qaK89-0005qc-7q; Sun, 27 Aug 2023 14:04:57 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <83a5ucjw2a.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 27 Aug
 2023 19:21:01 +0300")
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
 <yp14jkk5ywd.fsf@HIDDEN> <83a5ucjw2a.fsf@HIDDEN>
Date: Sun, 27 Aug 2023 14:04:57 -0400
Message-ID: <yp1r0no4b06.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Andrea Corallo <acorallo@HIDDEN>
>> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
>> Date: Sun, 27 Aug 2023 10:43:30 -0400
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> [...]
>> 
>> >> > Also, Andrea, why does
>> >> >
>> >> >   (native-compile 'foo SOME-FILE)
>> >> >
>> >> > signals an error?  I thought it should write the results of
>> >> > native-compilation to SOME-FILE, no?
>> >> 
>> >> Loos like a bug, if SOME-FILE is absolute it just works.  The fix look
>> >> trivial, I'll just test it a bit before pushing it.
>> >
>> > Thanks.
>> 
>> Fix pushed into 29 as e7ac50a1539.
>
> Thanks, now '(native-compile 'foo SOME-FILE)' succeeds, but
> disassemble signals an error:
>
>   (defun foo (a b)
>     (list a b))
>
>   (native-compile 'foo "foo.eln")
>   (disassemble 'foo)
>
>   Debugger entered--Lisp error: (search-failed "^.*<F666f6f_foo_0>:")
>     re-search-forward("^.*<F666f6f_foo_0>:")
>     disassemble-internal(foo 0 t)
>     disassemble(foo)
>     (progn (disassemble 'foo))
>     elisp--eval-last-sexp(t)
>     eval-last-sexp(t)
>     eval-print-last-sexp(nil)
>     funcall-interactively(eval-print-last-sexp nil)
>     command-execute(eval-print-last-sexp)
>
> I get a similar error even if I disassemble a function from a
> preloaded Lisp package, for example file-relative-name.
>
> It looks like a Windows-specific issue: the symbols produced by
> objdump here have a leading underscore:
>
>   6b341400 <_F666f6f_foo_0>:
>   6b341400:	57                   	push   %edi
>   6b341401:	56                   	push   %esi
>   6b341402:	53                   	push   %ebx
>
> So I think the regexp should be "^.*<_?F666f6f_foo_0>:" instead.

Yep agree, I think this bug was unrelated, could you please check that
ea5fd6c96bc works for you on Windows?

Thanks!

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 27 Aug 2023 16:21:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 12:21:45 2023
Received: from localhost ([127.0.0.1]:46029 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaIWG-0007x9-In
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:21:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44288)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qaIWC-0007wt-Dm
 for 65455 <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:21:42 -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 <eliz@HIDDEN>)
 id 1qaIW0-0008WH-WE; Sun, 27 Aug 2023 12:21:29 -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=95fRkAidCDJ3Eo7XLjK6+M75cQMF/5F0PaCPA4w5IXU=; b=Hn8cFuaxLIOL
 +OOGzYZXrFnL6u3MIaOiW7A6/Rr1fQ6+ZBXFitMBH9/cwnJEFLZAepg7ZeI5TZIr7F+CDP4wYnGu5
 mQEjRGX3iysWsaDw1cI9Io+PTTdtWa6aNULcYL8bXB432/Hx/K5NO0P/xuTfx4OFOsKAQgq3kJW79
 7W6OL3UsjVt5MDVsH/Vvt/Duq6K8sF61e8IR+K7HuAyo9FN5JebRv9ShGrLtCU+ELhc/OUWJonErP
 DSTPYukZ6tmFaTxaPrCMiU/Y/p9Ld3FH/LjjmrLslQ19NkRLDjC4uOS9gP/N/fp33t1gAIYWuLM3a
 SveAICnL8QU1JKAXfZu4Ww==;
Date: Sun, 27 Aug 2023 19:21:01 +0300
Message-Id: <83a5ucjw2a.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <yp14jkk5ywd.fsf@HIDDEN> (message from Andrea Corallo
 on Sun, 27 Aug 2023 10:43:30 -0400)
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
 <yp14jkk5ywd.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andrea Corallo <acorallo@HIDDEN>
> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
> Date: Sun, 27 Aug 2023 10:43:30 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> [...]
> 
> >> > Also, Andrea, why does
> >> >
> >> >   (native-compile 'foo SOME-FILE)
> >> >
> >> > signals an error?  I thought it should write the results of
> >> > native-compilation to SOME-FILE, no?
> >> 
> >> Loos like a bug, if SOME-FILE is absolute it just works.  The fix look
> >> trivial, I'll just test it a bit before pushing it.
> >
> > Thanks.
> 
> Fix pushed into 29 as e7ac50a1539.

Thanks, now '(native-compile 'foo SOME-FILE)' succeeds, but
disassemble signals an error:

  (defun foo (a b)
    (list a b))

  (native-compile 'foo "foo.eln")
  (disassemble 'foo)

  Debugger entered--Lisp error: (search-failed "^.*<F666f6f_foo_0>:")
    re-search-forward("^.*<F666f6f_foo_0>:")
    disassemble-internal(foo 0 t)
    disassemble(foo)
    (progn (disassemble 'foo))
    elisp--eval-last-sexp(t)
    eval-last-sexp(t)
    eval-print-last-sexp(nil)
    funcall-interactively(eval-print-last-sexp nil)
    command-execute(eval-print-last-sexp)

I get a similar error even if I disassemble a function from a
preloaded Lisp package, for example file-relative-name.

It looks like a Windows-specific issue: the symbols produced by
objdump here have a leading underscore:

  6b341400 <_F666f6f_foo_0>:
  6b341400:	57                   	push   %edi
  6b341401:	56                   	push   %esi
  6b341402:	53                   	push   %ebx

So I think the regexp should be "^.*<_?F666f6f_foo_0>:" instead.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 27 Aug 2023 15:42:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 11:42:00 2023
Received: from localhost ([127.0.0.1]:45999 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaHto-0006pB-Ah
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 11:42:00 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56318)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1qaHtm-0006or-5W
 for 65455 <at> debbugs.gnu.org; Sun, 27 Aug 2023 11:41:59 -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 <acorallo@HIDDEN>)
 id 1qaHta-00028K-Rg; Sun, 27 Aug 2023 11:41:46 -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=ekN/DoUA3Q1dM2dPVdaklgc/BG4IeNFPTs8yv/JMyjA=; b=kRuL5hfNE4O4J7z2cS/9
 x1vK9RROPFV3w7KQ0QHYxSC3KvYd36R+/mwKcPhxwywbRfeQfAM9tYqzL5lmwTaz+fdia3Ac4/iJ9
 9pmA9liibQGAmoq3oCg6QI8sLKjY6QSSyzmyYZ/Te7boSkhuYUCLSOQLy00Nknrhkoy6cdVr7JlEq
 gOLxxV0MNaeT+Im8RVO7cdVS1C+dOxwloap5RtSP2Vt9GElovMGV5B/kTcwdG5nu3ZUhj8N+ePVE5
 rx/nhZVSE6yQcu1FLnXzf+QINlv5hCDSDGYyzhUaJ8wqit7T05nziFZUbgYKz+l6Wj9exkRB1RKT0
 UB08T3iHnGJ7tg==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1qaHta-0000PN-KI; Sun, 27 Aug 2023 11:41:46 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <83fs44k3ig.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 27 Aug
 2023 16:40:07 +0300")
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
 <yp1zg2f5ogp.fsf@HIDDEN> <83a5ufnum6.fsf@HIDDEN>
 <yp1v8d35hzl.fsf@HIDDEN> <831qfrnpac.fsf@HIDDEN>
 <yp1msyc622w.fsf@HIDDEN> <83fs44k3ig.fsf@HIDDEN>
Date: Sun, 27 Aug 2023 11:41:46 -0400
Message-ID: <yp1zg2c4hmt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Andrea Corallo <acorallo@HIDDEN>
>> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
>> Date: Sun, 27 Aug 2023 09:34:47 -0400
>>
>> > If we want to support changes in the environment, I think it would be
>> > an impossibly high bar for such a minor feature.
>> >
>> > So perhaps the following would be enough:
>> >
>> >   . find the source .el file of the compiled function
>>
>> That's the tricky part, this bug report is about compiling and
>> disassembling a function with no source file:
>
> Yes.  I'm saying we should not try to support that case, because it's
> too hard.

Okay,

I pushed 91d2d8439bb into 29, please have a look if the working of the
error is okay.

Thanks

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 27 Aug 2023 14:44:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 10:43:59 2023
Received: from localhost ([127.0.0.1]:45950 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaGzf-0002au-KT
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 10:43:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1qaGzd-0002ah-RE
 for 65455 <at> debbugs.gnu.org; Sun, 27 Aug 2023 10:43:58 -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 <acorallo@HIDDEN>)
 id 1qaGzS-0000NT-HH; Sun, 27 Aug 2023 10:43:46 -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=YwzczgSYGJLu9U9PbpEW/ipnYD3NRKdDrZcpE/1IyBg=; b=GGrC27C5BOz5EgLq6kCm
 DINBCrfx3qBfIo0Bgo0uKVRyftYYiGTLJvfuqEoW/u1RbRWkxVSaQfPeAOicdcdrEGlMJdCkb/S/m
 Iij7Q3W7KZVPNaI71Mp1BrIul2KsVzIlWSNZEXgTmeffhXspTmiEaRdLs0JuHcGDI6n3XmXB4ucEm
 BHZK/zvGACJxThILTJEJ2S0on+bODRr+TSTATL/1AeS05mmPUBJ4WhGoEZvOkEA+ohJoDR8uNHSri
 hpqKUe/mrL18GuQAehQt9QQsXC6145RnsyAf+MWZVPlRhD8uHiSibIGmq5+fLvY8mA9TchmnQAfcW
 abVV9DZavqK6Rg==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1qaGzC-0002kG-Jv; Sun, 27 Aug 2023 10:43:45 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <83bkevny24.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 25 Aug
 2023 14:47:31 +0300")
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
Date: Sun, 27 Aug 2023 10:43:30 -0400
Message-ID: <yp14jkk5ywd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

[...]

>> > Also, Andrea, why does
>> >
>> >   (native-compile 'foo SOME-FILE)
>> >
>> > signals an error?  I thought it should write the results of
>> > native-compilation to SOME-FILE, no?
>> 
>> Loos like a bug, if SOME-FILE is absolute it just works.  The fix look
>> trivial, I'll just test it a bit before pushing it.
>
> Thanks.

Fix pushed into 29 as e7ac50a1539.

Bests

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 27 Aug 2023 13:40:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 09:40:50 2023
Received: from localhost ([127.0.0.1]:44406 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaG0Y-0000a0-DU
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 09:40:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56976)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qaG0U-0000Zm-7G
 for 65455 <at> debbugs.gnu.org; Sun, 27 Aug 2023 09:40:49 -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 <eliz@HIDDEN>)
 id 1qaG0I-0005uD-W9; Sun, 27 Aug 2023 09:40:35 -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=5m4u+kV0j2mCVPUqym/BnXLo/MBad1cU4lwRei05uW4=; b=ln1fOe8lpeBz
 VScetPmRi/9REevWTrn0wEWGoyKmGcoDS+RiPoWIV7TXTtAheeqBl1Lzi73pyBXEYLn9vKsi8xOQy
 rWhjzK93mOtyP+EYghmukJ0AoBEkgRwKdTcMN8UWBQjBLsWAozk6amJLAFBm6rxFNyrQp5ypF3XYv
 NvBYzDijtKnsEzXCjxAYrPE6JHsvTpu46cGosiOA3+3EY1b0ZdFzCRLmqifnD3anTpXWJDEo31xDo
 QDgV03R1eQ/4clO4RY/oQ91bAvIGMgDWPgX08X1nlXAwgTzi0NYW7Msn68E9c1fW587NTINt729xP
 qqc7cO0zgHDrrRAkwsesiA==;
Date: Sun, 27 Aug 2023 16:40:07 +0300
Message-Id: <83fs44k3ig.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <yp1msyc622w.fsf@HIDDEN> (message from Andrea Corallo
 on Sun, 27 Aug 2023 09:34:47 -0400)
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
 <yp1zg2f5ogp.fsf@HIDDEN> <83a5ufnum6.fsf@HIDDEN>
 <yp1v8d35hzl.fsf@HIDDEN> <831qfrnpac.fsf@HIDDEN>
 <yp1msyc622w.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andrea Corallo <acorallo@HIDDEN>
> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
> Date: Sun, 27 Aug 2023 09:34:47 -0400
> 
> > If we want to support changes in the environment, I think it would be
> > an impossibly high bar for such a minor feature.
> >
> > So perhaps the following would be enough:
> >
> >   . find the source .el file of the compiled function
> 
> That's the tricky part, this bug report is about compiling and
> disassembling a function with no source file:

Yes.  I'm saying we should not try to support that case, because it's
too hard.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 27 Aug 2023 13:35:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 09:35:08 2023
Received: from localhost ([127.0.0.1]:44401 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaFuz-0000RH-3M
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 09:35:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:43626)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1qaFut-0000Qr-QJ
 for 65455 <at> debbugs.gnu.org; Sun, 27 Aug 2023 09:35:03 -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 <acorallo@HIDDEN>)
 id 1qaFui-0004U8-Jj; Sun, 27 Aug 2023 09:34:48 -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=VTcoIg+3vUuApskHg/mcWlEVlm5HOCh3557VoV+NG3o=; b=hij8/vb9sSD85qOGkGXd
 VrNDU4OUT4VN62b7+ENcFq17oMw4BNSGeJM1iTszBugecxv/T+LC3rE82krbKFHhz/9WqFV2Cn7YT
 RBEZ9sDJcCDV7BOArMU7cjCPZT5pd0j2Uytw03Ke4uuADGRgbmsWuR1m2z0rnRrkEJt8HbtKUfvR+
 mp7VEIKOuQHfNUBm31ib3mCsLJrQhIu78sLRK1iHQ/WmaeVkuLYcf4PIE9X6L3bOWUF1iunxqp12h
 LOPWHBrrMTRQh1JWaRdFkBmR9AcykazPS/B1GqYCBjRc9t4PDtHRS1iw4tgMufJHtvn6on3+uphUw
 w42DLjEIyXN4SQ==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1qaFuh-0005KS-U6; Sun, 27 Aug 2023 09:34:48 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <831qfrnpac.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 25 Aug
 2023 17:56:59 +0300")
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
 <yp1zg2f5ogp.fsf@HIDDEN> <83a5ufnum6.fsf@HIDDEN>
 <yp1v8d35hzl.fsf@HIDDEN> <831qfrnpac.fsf@HIDDEN>
Date: Sun, 27 Aug 2023 09:34:47 -0400
Message-ID: <yp1msyc622w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Andrea Corallo <acorallo@HIDDEN>
>> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
>> Date: Fri, 25 Aug 2023 10:11:58 -0400
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> > I think we are mis-communicating.  What I meant is something like this:
>> >
>> >   . add a new optional argument to native-compile that would prevent
>> >     it from deleting the .eln file
>> >   . add a new function disassemble-native, which will call
>> >     native-compile with this new argument, perform disassembly, and
>> >     then delete the file
>> 
>> I see thanks for clarifying.
>> 
>> I'm not sure I like this option, reason is that I typically want to see
>> the disassembly of the already installed function rather than triggering
>> a new compilation.  Any change in the environment can lead to a
>> different output so I think is important to inspect what was produced
>> when it was commanded, no?
>
> If we want to support changes in the environment, I think it would be
> an impossibly high bar for such a minor feature.
>
> So perhaps the following would be enough:
>
>   . find the source .el file of the compiled function

That's the tricky part, this bug report is about compiling and
disassembling a function with no source file:

(defun foo (a b)      
  (list a b))         
                      
(native-compile 'foo) 
(disassemble 'foo)

In the moment we compile foo we loose it's original definition and we
can compile it twice :/

Thanks

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 14:56:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 10:56:48 2023
Received: from localhost ([127.0.0.1]:41058 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZYEy-0006I5-Hv
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 10:56:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40606)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qZYEv-0006Hm-Db
 for 65455 <at> debbugs.gnu.org; Fri, 25 Aug 2023 10:56:46 -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 <eliz@HIDDEN>)
 id 1qZYEk-0002D3-Hd; Fri, 25 Aug 2023 10:56:35 -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=7kK+CH7ztlNdo/MrZGpmtedBE/Yoomj2ddgzlMK/yAU=; b=sYWCVuVJ/rbF
 VGoD9rbD0O1NtAmZZ/3BDDPnwayizUtC0aG01OP0FaQ2FXnWo9M22VCZPm2STKZzfhriuPetSnZjx
 UvT2sGR3HDuKtNaHwNXCmxZ+z1B+29Ajh4JLFPDw0x7BJ4KqAcnQ46OZxQQrpDhAVsjY5VxMPqngm
 583FGwWw8qp/5UVsU1CDIClGCcr4tjpX9wzkVpiC4Kjg7TyXMOCOQGgP73p/MymedWGxjAc0f7/IY
 aQ8MsQV+FXrQRU4c70H6YE0aC+6io9BYTT2ClSzQsrYFZBk5TnsqnmK6qyo6c8fdp0SOBG/Y037Po
 S3OrLS3T4TeMeF8iSUru1w==;
Date: Fri, 25 Aug 2023 17:56:59 +0300
Message-Id: <831qfrnpac.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <yp1v8d35hzl.fsf@HIDDEN> (message from Andrea Corallo
 on Fri, 25 Aug 2023 10:11:58 -0400)
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
 <yp1zg2f5ogp.fsf@HIDDEN> <83a5ufnum6.fsf@HIDDEN>
 <yp1v8d35hzl.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andrea Corallo <acorallo@HIDDEN>
> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
> Date: Fri, 25 Aug 2023 10:11:58 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > I think we are mis-communicating.  What I meant is something like this:
> >
> >   . add a new optional argument to native-compile that would prevent
> >     it from deleting the .eln file
> >   . add a new function disassemble-native, which will call
> >     native-compile with this new argument, perform disassembly, and
> >     then delete the file
> 
> I see thanks for clarifying.
> 
> I'm not sure I like this option, reason is that I typically want to see
> the disassembly of the already installed function rather than triggering
> a new compilation.  Any change in the environment can lead to a
> different output so I think is important to inspect what was produced
> when it was commanded, no?

If we want to support changes in the environment, I think it would be
an impossibly high bar for such a minor feature.

So perhaps the following would be enough:

  . find the source .el file of the compiled function
  . compile it into a temporary file and disassemble the result
  . delete the compiled temporary file

Out of the alternatives you proposed only #3 is to some extent
acceptable, but it is too complicated, IMO.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 14:12:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 10:12:15 2023
Received: from localhost ([127.0.0.1]:41008 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZXXq-000570-VJ
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 10:12:15 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52344)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1qZXXn-00056m-LX
 for 65455 <at> debbugs.gnu.org; Fri, 25 Aug 2023 10:12:12 -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 <acorallo@HIDDEN>)
 id 1qZXXd-0002w4-KJ; Fri, 25 Aug 2023 10:12:01 -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=BtZfywFOt0nJrIYA/87QasaWPwVmGh7U5HbsX3Qn3rU=; b=lokxqzVTFH4KkqKOFkUi
 YJcC+dlgdiYitDVYVgSk4uw8+HqmXlN4WebcUJNw9WI1WMCScCkswrh7VMkVT1vvyIU0J9SUDeCKu
 bZmzCFIBVCfTg78G7lwFJYcGNVS1zwbz/AAs5Z1Gq6kwFDPSJOBmXgscm3yqxVmCfTmClxF9pXBBa
 HT+9mgErb2E6EA+2GoGOGX3a8pXPbRgNOiWM3BxQ50CoS1Da+ofO+BJHQ5uezDnGVLlu8tuhjrY7l
 XsI1lgaALM4qsXzWSmoVyOTJdAo6zBdRFr6o4z3H/TU65//D5/Ehcfn06o0tn4yAUAnShJiFRkpg7
 CakpctIvHvi2YQ==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1qZXXa-0007o5-8o; Fri, 25 Aug 2023 10:11:58 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <83a5ufnum6.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 25 Aug
 2023 16:01:53 +0300")
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
 <yp1zg2f5ogp.fsf@HIDDEN> <83a5ufnum6.fsf@HIDDEN>
Date: Fri, 25 Aug 2023 10:11:58 -0400
Message-ID: <yp1v8d35hzl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Andrea Corallo <acorallo@HIDDEN>
>> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
>> Date: Fri, 25 Aug 2023 07:52:06 -0400
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> >> > None of the above sounds a good idea to me.  How about a special
>> >> > disassemble-native function, which will keep the temporary file until
>> >> > after the disassembly, and then delete it?  Gerd, would that be good
>> >> > enough?
>> >> 
>> >> Mmmh, I'm not sure I undestand, how can disassemble-native keep the
>> >> temporary file if this was deleted just after it was compiled and
>> >> loaded?
>> >
>> > By instructing the compilation not to delete it, and then deleting it
>> > after disassembly, I guess?
>> 
>> Okay but what if the file is never disassembled?  What if it's
>> disassembled more than once?  Isn't 3 simpler at this stage?
>
> I think we are mis-communicating.  What I meant is something like this:
>
>   . add a new optional argument to native-compile that would prevent
>     it from deleting the .eln file
>   . add a new function disassemble-native, which will call
>     native-compile with this new argument, perform disassembly, and
>     then delete the file

I see thanks for clarifying.

I'm not sure I like this option, reason is that I typically want to see
the disassembly of the already installed function rather than triggering
a new compilation.  Any change in the environment can lead to a
different output so I think is important to inspect what was produced
when it was commanded, no?

Bests

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 13:01:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 09:01:40 2023
Received: from localhost ([127.0.0.1]:39599 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZWRY-0002vS-5U
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 09:01:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49604)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qZWRW-0002vF-07
 for 65455 <at> debbugs.gnu.org; Fri, 25 Aug 2023 09:01:38 -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 <eliz@HIDDEN>)
 id 1qZWRL-0005Hq-CW; Fri, 25 Aug 2023 09:01:27 -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=HfqYHxxT36eRxrYZg2KTRr61ucO7ODlPVsciACm7dDM=; b=rcXXQzmglUUe
 cleVJds8bhxjlj2Po28ADwUPQ8yR+HX4hLu7Wn43k88WaWyMoVZH2RmPxryG9xVVX/f/VUWot7eCM
 YTEZw2rveI0HpzH4tJ9a1PBELihKE3wVLzeEsN3bxJeUfMckYTbIHnnauW5RGtyz347lP5C10dIdB
 8o+WiUD6Z4RMsmVHuPcifURdXGoMNnSF1hK6zfsqJWq1/y/g97GBrZ0DUvDLAQAd595tj6NzBXhCD
 vYlXpq1jvGYYrNJO+Ft/YyXCfK3iCnMn+u7RuZMXvV8iP/0eLh3jCvy+LW5S5+p31oE0TlNR/IaXe
 d5ZOKY9fjF7Ii3WDMzMI/w==;
Date: Fri, 25 Aug 2023 16:01:53 +0300
Message-Id: <83a5ufnum6.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <yp1zg2f5ogp.fsf@HIDDEN> (message from Andrea Corallo
 on Fri, 25 Aug 2023 07:52:06 -0400)
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
 <yp1zg2f5ogp.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andrea Corallo <acorallo@HIDDEN>
> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
> Date: Fri, 25 Aug 2023 07:52:06 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> > None of the above sounds a good idea to me.  How about a special
> >> > disassemble-native function, which will keep the temporary file until
> >> > after the disassembly, and then delete it?  Gerd, would that be good
> >> > enough?
> >> 
> >> Mmmh, I'm not sure I undestand, how can disassemble-native keep the
> >> temporary file if this was deleted just after it was compiled and
> >> loaded?
> >
> > By instructing the compilation not to delete it, and then deleting it
> > after disassembly, I guess?
> 
> Okay but what if the file is never disassembled?  What if it's
> disassembled more than once?  Isn't 3 simpler at this stage?

I think we are mis-communicating.  What I meant is something like this:

  . add a new optional argument to native-compile that would prevent
    it from deleting the .eln file
  . add a new function disassemble-native, which will call
    native-compile with this new argument, perform disassembly, and
    then delete the file




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 11:52:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 07:52:20 2023
Received: from localhost ([127.0.0.1]:39484 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZVMS-0000vC-2c
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 07:52:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51854)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1qZVMP-0000ut-Le
 for 65455 <at> debbugs.gnu.org; Fri, 25 Aug 2023 07:52:18 -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 <acorallo@HIDDEN>)
 id 1qZVMF-00073Q-Kx; Fri, 25 Aug 2023 07:52:07 -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=42aH4s+lsEevyRAp8Noak9gOeVtKTY8X9t4Uk3/hNdw=; b=OzEnQL5ewQCh84RTP70e
 npDrgVyebT3vUIYtYbgmCewwGzNn3e4AOQ4hjyEZ9w0uKg75UPtss6VtHWrUvdxWTGjnLnWx84yzt
 GUZZAfWoMkRT891zWPgo9bNucNDGmknK3gvdtv1bG/D0Lm3Uvh4TxJvc7t3EqY396uaC01bWaZVs/
 vRmwRryU8ig2GH1Sqz+omhay1k2D2q2ASWoU6TfOA89fhoXU1WDxYqx1bUPQ5P7lAZZG95Q8pkBGm
 oo6ya3NEX+Agr/IeBa2xrXFXCysPiIfgNPQTBSKSkeY0UxRS9OOsvF9NngsXv0NN+Bl99Nqdb1GHZ
 YrKT9crDvsz2tQ==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1qZVME-0004XC-Hh; Fri, 25 Aug 2023 07:52:07 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <83bkevny24.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 25 Aug
 2023 14:47:31 +0300")
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN> <83bkevny24.fsf@HIDDEN>
Date: Fri, 25 Aug 2023 07:52:06 -0400
Message-ID: <yp1zg2f5ogp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Andrea Corallo <acorallo@HIDDEN>
>> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
>> Date: Fri, 25 Aug 2023 07:43:07 -0400
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> >> Cc: 65455 <at> debbugs.gnu.org
>> >> From: Andrea Corallo <acorallo@HIDDEN>
>> >> Date: Fri, 25 Aug 2023 04:11:48 -0400
>> >> 
>> >> 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.
>> >
>> > None of the above sounds a good idea to me.  How about a special
>> > disassemble-native function, which will keep the temporary file until
>> > after the disassembly, and then delete it?  Gerd, would that be good
>> > enough?
>> 
>> Mmmh, I'm not sure I undestand, how can disassemble-native keep the
>> temporary file if this was deleted just after it was compiled and
>> loaded?
>
> By instructing the compilation not to delete it, and then deleting it
> after disassembly, I guess?

Okay but what if the file is never disassembled?  What if it's
disassembled more than once?  Isn't 3 simpler at this stage?

Thanks

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 11:47:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 07:47:17 2023
Received: from localhost ([127.0.0.1]:39472 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZVHY-0000ha-UZ
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 07:47:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60566)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qZVHX-0000hN-Ij
 for 65455 <at> debbugs.gnu.org; Fri, 25 Aug 2023 07:47:16 -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 <eliz@HIDDEN>)
 id 1qZVHN-0006BL-NI; Fri, 25 Aug 2023 07:47:05 -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=siCF+RiK91AO/7JX8m68gjVv2x+82x2vTfWMQrFZ5eg=; b=l9r+NBdSSWAY
 Yp9Lc5GFIyi44/pcWOqQkVGszIGrnJN4MtX4Oa6s7JHPgkvx0zjCgjeP3py7hfNTrBxkh1hnQC2z3
 CISdv7WHySv+U2+kvqH/cBzxct68BJHXX3bipW+LtVm5o2zsr6sdjRQk4Frfna/CnBVVZBypWlsuR
 IxirynZ4JVO1udEfLZYg4NNX+fwFSa/gXUUJaNCMvmG2vph504C0xWKXRxWgWhonHxI/dcXfANC8M
 aBWKX2smLJD0kxqoN19LuMW4zOGAVBvTq1SnM9q4sSZICGNN8eDrs8Y0HbnPmqPm3ARebwuEdLSkl
 QzJzO/bzoCf1VTC+v7203g==;
Date: Fri, 25 Aug 2023 14:47:31 +0300
Message-Id: <83bkevny24.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <yp18r9z73g4.fsf@HIDDEN> (message from Andrea Corallo
 on Fri, 25 Aug 2023 07:43:07 -0400)
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
 <yp18r9z73g4.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andrea Corallo <acorallo@HIDDEN>
> Cc: gerd.moellmann@HIDDEN,  65455 <at> debbugs.gnu.org
> Date: Fri, 25 Aug 2023 07:43:07 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> Cc: 65455 <at> debbugs.gnu.org
> >> From: Andrea Corallo <acorallo@HIDDEN>
> >> Date: Fri, 25 Aug 2023 04:11:48 -0400
> >> 
> >> 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.
> >
> > None of the above sounds a good idea to me.  How about a special
> > disassemble-native function, which will keep the temporary file until
> > after the disassembly, and then delete it?  Gerd, would that be good
> > enough?
> 
> Mmmh, I'm not sure I undestand, how can disassemble-native keep the
> temporary file if this was deleted just after it was compiled and
> loaded?

By instructing the compilation not to delete it, and then deleting it
after disassembly, I guess?

> > Also, Andrea, why does
> >
> >   (native-compile 'foo SOME-FILE)
> >
> > signals an error?  I thought it should write the results of
> > native-compilation to SOME-FILE, no?
> 
> Loos like a bug, if SOME-FILE is absolute it just works.  The fix look
> trivial, I'll just test it a bit before pushing it.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 11:43:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 07:43:19 2023
Received: from localhost ([127.0.0.1]:39457 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZVDj-0000YZ-GU
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 07:43:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53908)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1qZVDh-0000YF-NU
 for 65455 <at> debbugs.gnu.org; Fri, 25 Aug 2023 07:43:18 -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 <acorallo@HIDDEN>)
 id 1qZVDX-0005IP-H6; Fri, 25 Aug 2023 07:43:07 -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=L4+wX2bfHN0/DwskjwOjs0LhBqI0fYmvpzxAmmobQmE=; b=jb99dFuUiSpJZ0kzGEu4
 OZKub847RkeLoTU4cxe1bsLnO9qGATb+uYgJAnKTjQte58NSvhnT0ssnAZI0CmjWEeUo5Ludx7tN8
 UQFvmcBL430tY/AorQckcNsC2cDY/ZAkPqdaJNMEeTKVp9u39ojgDWwlYhGJLP4+35ctKus2nE3s0
 QOaGrcTJlQaX1kK81f68KKQ9Ae1MsZaE6WRuOQUDz08mP3XCrFEDRXyZtpDSG5gPwos10wkwLQmgU
 zShN+GyYTrPpzjQBfiWKW59yrRORmvqBiJjchid2U9RTTG0BxCTJHpXk2SNAR+jBcWe+PKnI5PrqZ
 s32A3N/QswTwxw==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1qZVDX-0003Z1-66; Fri, 25 Aug 2023 07:43:07 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <83edjro1mm.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 25 Aug
 2023 13:30:25 +0300")
References: <m21qfvxllq.fsf@HIDDEN>
 <yp1ttsn7d8b.fsf@HIDDEN> <83edjro1mm.fsf@HIDDEN>
Date: Fri, 25 Aug 2023 07:43:07 -0400
Message-ID: <yp18r9z73g4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Cc: 65455 <at> debbugs.gnu.org
>> From: Andrea Corallo <acorallo@HIDDEN>
>> Date: Fri, 25 Aug 2023 04:11:48 -0400
>> 
>> 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.
>
> None of the above sounds a good idea to me.  How about a special
> disassemble-native function, which will keep the temporary file until
> after the disassembly, and then delete it?  Gerd, would that be good
> enough?

Mmmh, I'm not sure I undestand, how can disassemble-native keep the
temporary file if this was deleted just after it was compiled and
loaded?

> Also, Andrea, why does
>
>   (native-compile 'foo SOME-FILE)
>
> signals an error?  I thought it should write the results of
> native-compilation to SOME-FILE, no?

Loos like a bug, if SOME-FILE is absolute it just works.  The fix look
trivial, I'll just test it a bit before pushing it.

Thanks

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 10:30:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 06:30:10 2023
Received: from localhost ([127.0.0.1]:39352 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZU4v-0004IX-UK
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 06:30:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42042)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qZU4t-0004IF-Vh
 for 65455 <at> debbugs.gnu.org; Fri, 25 Aug 2023 06:30:08 -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 <eliz@HIDDEN>)
 id 1qZU4k-0005s3-4j; Fri, 25 Aug 2023 06:29:58 -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=1qQfZ30O8biqS86eTc31OQ8B9+nNLQC9K/eVpWePjW0=; b=q0Sf9+SZzJXU
 Jly7NhVjFxy9yzn52WOW7Vkg6GEMdoastnQLnCCPMKm5ZJ4w2RW07THj8DrxVPE3kkfemWwAjybCa
 kLuz8qBZnhkGTdJpuz1stryGlAc9wjm/RLPAT4Sv7dP+FfSMXVC2EnSNA2TwwmeO3ttwfNSADuYMX
 oidhYUnAia6lGTj6d+T4Q2RTlDINQ+9D78nrjKplt1uOAmnKKLdJH0AyZZn5nM5yonLMRf65ronfW
 RkAF6GubxFwxosOl3eMT9r2A1L/uQ3WWjfTElz4htaMLKBvnahphgMIZqKetXTKCDe0vTmPnA+AxQ
 Qubi5e2y3jQWIKJbQm8JWg==;
Date: Fri, 25 Aug 2023 13:30:25 +0300
Message-Id: <83edjro1mm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <yp1ttsn7d8b.fsf@HIDDEN> (message from Andrea Corallo
 on Fri, 25 Aug 2023 04:11:48 -0400)
Subject: Re: bug#65455: 30.0.50;
 Disassemble: error with "free-standing" native compiled function
References: <m21qfvxllq.fsf@HIDDEN> <yp1ttsn7d8b.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: gerd.moellmann@HIDDEN, 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 65455 <at> debbugs.gnu.org
> From: Andrea Corallo <acorallo@HIDDEN>
> Date: Fri, 25 Aug 2023 04:11:48 -0400
> 
> 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.

None of the above sounds a good idea to me.  How about a special
disassemble-native function, which will keep the temporary file until
after the disassembly, and then delete it?  Gerd, would that be good
enough?

Also, Andrea, why does

  (native-compile 'foo SOME-FILE)

signals an error?  I thought it should write the results of
native-compilation to SOME-FILE, no?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 25 Aug 2023 08:12:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 04:12:04 2023
Received: from localhost ([127.0.0.1]:39205 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZRvI-0000YH-Gn
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 04:12:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39916)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1qZRvD-0000Xk-1z
 for 65455 <at> debbugs.gnu.org; Fri, 25 Aug 2023 04:12:02 -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 <acorallo@HIDDEN>)
 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==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1qZRv2-0001sb-Tt; Fri, 25 Aug 2023 04:11:48 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Gerd =?utf-8?Q?M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <m21qfvxllq.fsf@HIDDEN> ("Gerd =?utf-8?Q?M=C3=B6llman?=
 =?utf-8?Q?n=22's?= message of "Tue, 22 Aug 2023 15:17:21 +0200")
References: <m21qfvxllq.fsf@HIDDEN>
Date: Fri, 25 Aug 2023 04:11:48 -0400
Message-ID: <yp1ttsn7d8b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 22 Aug 2023 15:38:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 22 11:38:58 2023
Received: from localhost ([127.0.0.1]:60217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYTT8-0002zP-5m
	for submit <at> debbugs.gnu.org; Tue, 22 Aug 2023 11:38:58 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52738)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qYTT6-0002zC-DX
 for 65455 <at> debbugs.gnu.org; Tue, 22 Aug 2023 11:38:56 -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 <eliz@HIDDEN>)
 id 1qYTSy-0007pB-6K; Tue, 22 Aug 2023 11:38:48 -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=Ge/LFarrM3conhxiAN+mw5OWgSXH7cRktYrUUTwY+Aw=; b=ov02eBoCfFtwF+qqNAsc
 rOYqPdLGynAkJbGIjzygwSX3mDMy2+c1rI2Qs8GNUJTgWFR+TgLe4+uTIKs2sc/YtbHg/Md2EQoGl
 9nQVf/DYLYKNZYyJc2LT9i7tj3QLOf2RGOWgFGsUIRgDWzH0I/cCQAeV62shWqCDTM6Cyk7HxMh8/
 19FamDXnLxSTq1A23NZ/twu8i7Q2zxlznZTdtDWnSUCeNYoCdPCK1BXRTVO6GJ5CTHgKKp8reB7YN
 gJI1JSEhoAvlMEyz56DSbBXio5QtjVI8Eyigagx39L6ubMR+CbgM+JAGfE/qmJyh4boElkKEsyBAG
 r7WD0taUfUsedQ==;
Date: Tue, 22 Aug 2023 18:39:05 +0300
Message-Id: <83zg2jrsrq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gerd =?iso-8859-1?Q?M=F6llmann?= <gerd.moellmann@HIDDEN>
In-Reply-To: <m2cyzfxkh7.fsf@HIDDEN> (message from Gerd
 =?iso-8859-1?Q?M=F6llmann?= on Tue, 22 Aug 2023 15:41:40 +0200)
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
References: <m21qfvxllq.fsf@HIDDEN> <831qfvtdca.fsf@HIDDEN>
 <m2cyzfxkh7.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: 65455 <at> debbugs.gnu.org, acorallo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Gerd M÷llmann <gerd.moellmann@HIDDEN>
> Cc: Andrea Corallo <acorallo@HIDDEN>,  65455 <at> debbugs.gnu.org
> Date: Tue, 22 Aug 2023 15:41:40 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > What happens if you do
> >
> >   (native-compile 'foo "foo.eln")
> >
> > instead?
> >
> > Adding Andrea.
> 
> Ok. I did
> 
> (fmakunbound 'foo)
> (defun foo (a b)
>   (list a b))
> (native-compile 'foo "foo.eln")
> 
> That resulted in an error, with *Messages* containing
> 
> comp--native-compile: Native compiler error: foo, "Compiling foo.eln...
> Wrong type argument: stringp, nil

Let's wait for Andrea to chime in.  Maybe I misunderstood the intended
way of calling that function or what exactly its 2nd argument is.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 22 Aug 2023 13:41:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 22 09:41:54 2023
Received: from localhost ([127.0.0.1]:58775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYRdq-0007ax-6T
	for submit <at> debbugs.gnu.org; Tue, 22 Aug 2023 09:41:54 -0400
Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:56754)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gerd.moellmann@HIDDEN>) id 1qYRdo-0007ag-9K
 for 65455 <at> debbugs.gnu.org; Tue, 22 Aug 2023 09:41:52 -0400
Received: by mail-wm1-x335.google.com with SMTP id
 5b1f17b1804b1-3fe8242fc4dso44434085e9.1
 for <65455 <at> debbugs.gnu.org>; Tue, 22 Aug 2023 06:41:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1692711703; x=1693316503;
 h=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=rJyGqzA8dvS7Zjq2mDTd4xjFunoh8BzCbmhHttW6AdI=;
 b=HOy/zy7aTKnqv2jnY7QYfoS7FHh81tuf3Kg2OTZ6DapnRYFPb4d1GzTcFwXjbMzYsO
 ClyjAfrqeqtjrruLWQX1PqTOKnEuhdEAwtvovD/6s3eFJ2L5tvuWaINTo9F6xWCzKYVl
 iu1/10hW5AGmHtDHGpeYTq48Wm+F02TjM1xsncmGK1jYccZDnnCstrhU42mENMigYpJ2
 q2Uim25R+7ahnqnQKDvzj4QE6fPa20qlRNDi5M7ATsE9MQBfAlNK65eCj4X2t6eT6nZC
 sMGs45C0K08s4ivD5vDsGKrURJSQLe48h9wGNW91Y8JVrUvGpcOzprCAdgr++MsLPwXP
 R70Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1692711703; x=1693316503;
 h=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=rJyGqzA8dvS7Zjq2mDTd4xjFunoh8BzCbmhHttW6AdI=;
 b=Tn5J5/XUz/a1IXPJVJv5g3Y66hf6UL/72KZaRTQFPNwvrMD/oLMUgyWnGRo2ku38rI
 fY58lKZr3/35VGknelr6/t+nDGjqO1yVexBN/l8Sg5dHN/B+racAB61cSYs7pP4b0ql0
 6GGcN9l917Tq020QcSLIYFJTdS4lSLNbuCfpk9wwwc4oIYigd3Zj9umWbotO2f9Q1m2M
 u2chujIEpigij+NCQFAYzJ/+v7oBQyze2jmU37M4MAzfEwUO3dEXi6F+3Sol8Htc8MVg
 HEPwpsGMQLgvAtLm9Wu7fcK/90klk2StbI+2LA//lGpXqxdYfkqbu7KeZLXjkOhmRRFV
 RfIQ==
X-Gm-Message-State: AOJu0YzP3L/JHvefHEdevznmRjDBNKCNRsdq2pKTCha3Oivg/HeQLm11
 cK6QoMiuw4/FUo0cQVOrP5OrUKV210zXXMqS
X-Google-Smtp-Source: AGHT+IGrnt1dr2ShREjS+1yyNi7ocvYOEcz/p49EnMI287IrBIjLqFDdnccQ4V/lIqs68dAZhS/WXw==
X-Received: by 2002:a1c:7508:0:b0:3fe:dc99:56ea with SMTP id
 o8-20020a1c7508000000b003fedc9956eamr7118604wmc.19.1692711702874; 
 Tue, 22 Aug 2023 06:41:42 -0700 (PDT)
Received: from Mini.fritz.box (pd9e363f4.dip0.t-ipconnect.de. [217.227.99.244])
 by smtp.gmail.com with ESMTPSA id
 d17-20020adfef91000000b0031ad5fb5a0fsm16066236wro.58.2023.08.22.06.41.41
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Aug 2023 06:41:41 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65455: 30.0.50; Disassemble: error with "free-standing"
 native compiled function
In-Reply-To: <831qfvtdca.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 22 Aug
 2023 16:29:25 +0300")
References: <m21qfvxllq.fsf@HIDDEN> <831qfvtdca.fsf@HIDDEN>
Date: Tue, 22 Aug 2023 15:41:40 +0200
Message-ID: <m2cyzfxkh7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65455
Cc: 65455 <at> debbugs.gnu.org, Andrea Corallo <acorallo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> What happens if you do
>
>   (native-compile 'foo "foo.eln")
>
> instead?
>
> Adding Andrea.

Ok. I did

(fmakunbound 'foo)
(defun foo (a b)
  (list a b))
(native-compile 'foo "foo.eln")

That resulted in an error, with *Messages* containing

comp--native-compile: Native compiler error: foo, "Compiling foo.eln...
Wrong type argument: stringp, nil

Error: wrong-type-argument (stringp nil)
  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0x1ffb7762e512f81>))
  debug-early-backtrace()
  debug-early(error (wrong-type-argument stringp nil))
  file-exists-p(nil)
  comp-compile-ctxt-to-file(\"foo.eln\")
  comp-final1()
  load-with-code-conversion(\"/private/var/folders/1d/k_6t25f94sl83szqbf8gpkrh0000gn/T/emacs-int-comp-foo-e1cmnO.el\" \"/private/var/folders/1d/k_6t25f94sl83szqbf8gpkrh0000gn/T/emacs-int-comp-foo-e1cmnO.el\" nil t)
  command-line-1((\"-l\" \"/var/folders/1d/k_6t25f94sl83szqbf8gpkrh0000gn/T/emacs-int-comp-foo-e1cmnO.el\"))
  command-line()
  normal-top-level()




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at 65455 <at> debbugs.gnu.org:


Received: (at 65455) by debbugs.gnu.org; 22 Aug 2023 13:29:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 22 09:29:17 2023
Received: from localhost ([127.0.0.1]:58761 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYRRd-0007Ge-6Y
	for submit <at> debbugs.gnu.org; Tue, 22 Aug 2023 09:29:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34788)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qYRRb-0007GO-52
 for 65455 <at> debbugs.gnu.org; Tue, 22 Aug 2023 09:29:15 -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 <eliz@HIDDEN>)
 id 1qYRRS-00046b-Q3; Tue, 22 Aug 2023 09:29:06 -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=+VwjnA5K42OuGhLT+NKq/588G/vOeCd/E75V6M+Ycgs=; b=B80Ki2Xcb4MUvX1UXZ1U
 sKFf3Ls+DSxMk9QSjS2of0jqSQ9iH+jZ+FMk8yzuZMmth/7HQ5kGO4NJDGH8kOhegL7i5Gjlt5oGY
 cBrYbnL3c9mwbgF16OYoRLFG+h3xuqiAIr/PBJefIVhZGHxEdTyqHidZSnJ76MzIww1EN7Gv/em9y
 ysQ4Uk6i3SIWqIBhOjhc4B4a1M8KXmLelGE7miep3tRWi6mx2aSyKYmPAXXQltgyWFscBfFX4FtJc
 boUEU6lDxtS6ohKmXEUJ+yDoFF/E06JwYtYRmi/CeOzDlsEsgA+pGIO+Y2nQU8e/umU/V6K8iQUD7
 BoTCKHXGUTa81w==;
Date: Tue, 22 Aug 2023 16:29:25 +0300
Message-Id: <831qfvtdca.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gerd =?iso-8859-1?Q?M=F6llmann?= <gerd.moellmann@HIDDEN>, Andrea
 Corallo <acorallo@HIDDEN>
In-Reply-To: <m21qfvxllq.fsf@HIDDEN> (message from Gerd
 =?iso-8859-1?Q?M=F6llmann?= on Tue, 22 Aug 2023 15:17:21 +0200)
Subject: Re: bug#65455: 30.0.50;
 Disassemble: error with "free-standing" native compiled function
References: <m21qfvxllq.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65455
Cc: 65455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Gerd M÷llmann <gerd.moellmann@HIDDEN>
> Date: Tue, 22 Aug 2023 15:17:21 +0200
> 
> 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.

What happens if you do

  (native-compile 'foo "foo.eln")

instead?

Adding Andrea.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Aug 2023 13:17:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 22 09:17:54 2023
Received: from localhost ([127.0.0.1]:58751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYRGb-000708-UM
	for submit <at> debbugs.gnu.org; Tue, 22 Aug 2023 09:17:54 -0400
Received: from lists.gnu.org ([2001:470:142::17]:35070)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gerd.moellmann@HIDDEN>) id 1qYRGa-0006zp-5D
 for submit <at> debbugs.gnu.org; Tue, 22 Aug 2023 09:17:52 -0400
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 <gerd.moellmann@HIDDEN>)
 id 1qYRGD-00011C-Ot
 for bug-gnu-emacs@HIDDEN; Tue, 22 Aug 2023 09:17:31 -0400
Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1qYRGA-0000ja-3b
 for bug-gnu-emacs@HIDDEN; Tue, 22 Aug 2023 09:17:29 -0400
Received: by mail-ed1-x52f.google.com with SMTP id
 4fb4d7f45d1cf-5230a22cfd1so5608153a12.1
 for <bug-gnu-emacs@HIDDEN>; Tue, 22 Aug 2023 06:17:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1692710244; x=1693315044;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=JH0xffCnacqVslkmrSQSobRCtx/vy+vccC6ZYlVdV38=;
 b=Svy9rVfXvK2IWIU96IheKo/BXVmteoh9dtIXmbF19DZvwGk0RsKwOKDJfA0hWLBBuZ
 geVk/fZqzsRCKKLTaetgRjfsAHIAOVzSwwzpIeAUTKWtJ8ioSRWlLY1kY+yAE0kAE+zv
 UGmEaBRojiZidxooaVXNFaG59p4yLY7bJ5s/hnIFWTZNEegwGAcgjfTzOfnCnWL3AxbO
 9fndpXYeTieRcE3bUec7HldvZ5aV+358mYQriNbJuDTKDcLswUBjLlrX0MwCfiVSnQDe
 GnH0rR1vyxHvftbr4JjUM5fdWEbM4l3pOxc8rciDV6Hn06i17gRQJiuaDC8DU8wRSwdP
 oLXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1692710244; x=1693315044;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=JH0xffCnacqVslkmrSQSobRCtx/vy+vccC6ZYlVdV38=;
 b=dziQVR2uqwS3pq1GjJ3R2rUSeyw8dDQT1i+JfMZrTP0ocrBtSZSMBIOmJi62gTGNf7
 RY8NaZN2c8cy4ixvw11nBQ9engeBVXsohrpWyoljt3GXIxwJH0kl+3q68BPO5aDLKGTU
 TF6vc+Mk6HSqIErBLuX5bVbzut41YEUn9rRjrV5klDz/+1313IgGK/hbdUphCLqTegym
 HwvgN4X3d16YJXIgWzqoUNQAad0bPZefKrIsD4UorZRUYFVzOlVEd/dqgBbTZevyxxtK
 eu5YFC5cmuqX9loSuPtE8jhbG+UF0f/8AN5aK6qnh2eFKQNvFjB/6oxmnKP6EHO1fVK+
 Zlyg==
X-Gm-Message-State: AOJu0Ywz6R7K1ap4ViEI4DJkaSK0s8gS1PIUsSIM27aNuvtWli/+v9FH
 9mpPAG5kf4pvIG91qMZJqdRXgLgVGK546pAA
X-Google-Smtp-Source: AGHT+IECgxYE3m2GNsopfxbLQDhCDC9P8saKPriVr5rBs8T4+bqKBU+DpTxevVFqzM5D8PJ6ashZhg==
X-Received: by 2002:aa7:df0e:0:b0:522:b112:6254 with SMTP id
 c14-20020aa7df0e000000b00522b1126254mr7501791edy.4.1692710243919; 
 Tue, 22 Aug 2023 06:17:23 -0700 (PDT)
Received: from Mini.fritz.box (pd9e363f4.dip0.t-ipconnect.de. [217.227.99.244])
 by smtp.gmail.com with ESMTPSA id
 d19-20020a056402517300b005272523b162sm7496834ede.69.2023.08.22.06.17.22
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Aug 2023 06:17:23 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; Disassemble: error with "free-standing" native compiled
 function
Date: Tue, 22 Aug 2023 15:17:21 +0200
Message-ID: <m21qfvxllq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::52f;
 envelope-from=gerd.moellmann@HIDDEN; helo=mail-ed1-x52f.google.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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

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=-g -O0''




Acknowledgement sent to Gerd M├Âllmann <gerd.moellmann@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#65455; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 27 Aug 2023 18:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.