GNU bug report logs - #68668
30.0.50; Invalid hash table test: tab-bar--auto-width-hash-test

Previous Next

Package: emacs;

Reported by: No Wayman <iarchivedmywholelife <at> gmail.com>

Date: Tue, 23 Jan 2024 03:46:01 UTC

Severity: normal

Tags: confirmed

Merged with 68821

Fixed in version 30.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68668 in the body.
You can then email your comments to 68668 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Tue, 23 Jan 2024 03:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to No Wayman <iarchivedmywholelife <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 23 Jan 2024 03:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: No Wayman <iarchivedmywholelife <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Invalid hash table test: tab-bar--auto-width-hash-test
Date: Mon, 22 Jan 2024 22:46:05 -0500
Apologies for the vague report.
I've been unable to track down a reliable reproduction recipe.
Tonight, when evaluating the following:

(comp--native-compile (lambda nil) nil nil)

The following error is signaled:

Debugger entered--Lisp error: (native-compiler-error "Invalid hash 
table test: tab-bar--auto-width-hash-test\n\nError: error 
(\"Invalid hash table test\" tab-bar--auto-width-hash-test)\n 
read(#<buffer  *load*>)\n 
load-with-code-conversion(\"/tmp/emacs-int-comp-comp-lambda-AXDHaA-YLR7FG.el\" 
\"/tmp/emacs-int-comp-comp-lambda-AXDHaA-YLR7FG.el\" nil t)\n 
command-line-1((\"-l\" 
\"/tmp/emacs-int-comp-comp-lambda-AXDHaA-YLR7FG.el\"))\n 
command-line()\n  normal-top-level()\n")

I saw the same several days ago when using trying to `macroexpand' 
a form. 


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.40, cairo version 1.18.0) of 2024-01-22 built on laptop
Repository revision: f821ac29e0cf69316d6c721bafe9b749b47a6db3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101011
System Description: Arch Linux





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Tue, 23 Jan 2024 07:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: No Wayman <iarchivedmywholelife <at> gmail.com>
Cc: 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Tue, 23 Jan 2024 09:06:29 +0200
> Debugger entered--Lisp error:
> (native-compiler-error "Invalid hash table test:
> tab-bar--auto-width-hash-test

Yesterday I was seeing exactly the same error
until recompiled and restarted Emacs.

Please confirm that bootstrap fixed this problem for you.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 24 Jan 2024 08:02:03 GMT) Full text and rfc822 format available.

Message #11 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: No Wayman <iarchivedmywholelife <at> gmail.com>
Cc: 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 24 Jan 2024 09:50:13 +0200
close 68668 30.0.50
thanks

>> Debugger entered--Lisp error:
>> (native-compiler-error "Invalid hash table test:
>> tab-bar--auto-width-hash-test
>
> Yesterday I was seeing exactly the same error
> until recompiled and restarted Emacs.
>
> Please confirm that bootstrap fixed this problem for you.

I suppose everything is ok now, so closing.




bug marked as fixed in version 30.0.50, send any further explanations to 68668 <at> debbugs.gnu.org and No Wayman <iarchivedmywholelife <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 24 Jan 2024 08:02:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 24 Jan 2024 08:06:01 GMT) Full text and rfc822 format available.

Message #16 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: iarchivedmywholelife <iarchivedmywholelife <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 24 Jan 2024 03:05:24 -0500
[Message part 1 (text/plain, inline)]
Did not have time to test it today.
-------- Original message --------From: Juri Linkov <juri <at> linkov.net> Date: 1/24/24  3:01 AM  (GMT-05:00) To: No Wayman <iarchivedmywholelife <at> gmail.com> Cc: 68668 <at> debbugs.gnu.org Subject: Re: bug#68668: 30.0.50; Invalid hash table test: tab-bar--auto-width-hash-test close 68668 30.0.50thanks>> Debugger entered--Lisp error:>> (native-compiler-error "Invalid hash table test:>> tab-bar--auto-width-hash-test>> Yesterday I was seeing exactly the same error> until recompiled and restarted Emacs.>> Please confirm that bootstrap fixed this problem for you.I suppose everything is ok now, so closing.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 24 Jan 2024 16:47:02 GMT) Full text and rfc822 format available.

Message #19 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: Juri Linkov <juri <at> linkov.net>
Cc: No Wayman <iarchivedmywholelife <at> gmail.com>, 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 24 Jan 2024 07:46:14 -0600
Juri Linkov <juri <at> linkov.net> writes:

> close 68668 30.0.50
> thanks
>
>>> Debugger entered--Lisp error:
>>> (native-compiler-error "Invalid hash table test:
>>> tab-bar--auto-width-hash-test
>>
>> Yesterday I was seeing exactly the same error
>> until recompiled and restarted Emacs.
>>
>> Please confirm that bootstrap fixed this problem for you.
>
> I suppose everything is ok now, so closing.

EMBA is still hitting this[1] and I can reproduce it here on
Debian testing with just:

  git clone https://git.savannah.gnu.org/git/emacs.git
  cd emacs
  make bootstrap
  make test/src/keymap-tests.log

1. https://emba.gnu.org/emacs/emacs/-/jobs/80161




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 24 Jan 2024 17:04:01 GMT) Full text and rfc822 format available.

Message #22 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: john muhl <jm <at> pub.pink>
Cc: No Wayman <iarchivedmywholelife <at> gmail.com>, 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 24 Jan 2024 19:02:40 +0200
reopen 68668
tags 68668 confirmed
thanks

>>>> Debugger entered--Lisp error:
>>>> (native-compiler-error "Invalid hash table test:
>>>> tab-bar--auto-width-hash-test
>>>
> EMBA is still hitting this[1] and I can reproduce it here on
> Debian testing with just:
>
>   git clone https://git.savannah.gnu.org/git/emacs.git
>   cd emacs
>   make bootstrap
>   make test/src/keymap-tests.log
>
> 1. https://emba.gnu.org/emacs/emacs/-/jobs/80161

Thanks for the reference to the failing test case
'keymap-test-duplicate-definitions'.  So now reopening.




bug No longer marked as fixed in versions 30.0.50 and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 24 Jan 2024 17:04:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 24 Jan 2024 17:04:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Thu, 25 Jan 2024 08:42:02 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: 68668 <at> debbugs.gnu.org, john muhl <jm <at> pub.pink>,
 No Wayman <iarchivedmywholelife <at> gmail.com>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Thu, 25 Jan 2024 09:40:55 +0100
john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

Hi John,

> EMBA is still hitting this[1] and I can reproduce it here on
> Debian testing with just:
>
>   git clone https://git.savannah.gnu.org/git/emacs.git
>   cd emacs
>   make bootstrap
>   make test/src/keymap-tests.log
>
> 1. https://emba.gnu.org/emacs/emacs/-/jobs/80161

ATM, we have problems on emba with git mirroring. The job you are
referring to ran on top of:

--8<---------------cut here---------------start------------->8---
commit 87cf30fba37346a179c6307a29d5d39b39311cef
Author: Basil L. Contovounesios <contovob <at> tcd.ie>
Date:   Fri Jan 19 13:50:29 2024 +0100

    Further shrink eglot--{}
--8<---------------cut here---------------end--------------->8---

We are working on bringing emba back to recent.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Thu, 25 Jan 2024 08:42:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Thu, 25 Jan 2024 17:52:01 GMT) Full text and rfc822 format available.

Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 68668 <at> debbugs.gnu.org, "john muhl via Bug reports for GNU Emacs,
 the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>, No Wayman <iarchivedmywholelife <at> gmail.com>,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Thu, 25 Jan 2024 11:44:12 -0600
Michael Albinus <michael.albinus <at> gmx.de> writes:

> john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <bug-gnu-emacs <at> gnu.org> writes:
>
> Hi John,
>
>> EMBA is still hitting this[1] and I can reproduce it here on
>> Debian testing with just:
>>
>>   git clone https://git.savannah.gnu.org/git/emacs.git
>>   cd emacs
>>   make bootstrap
>>   make test/src/keymap-tests.log
>>
>> 1. https://emba.gnu.org/emacs/emacs/-/jobs/80161
>
> ATM, we have problems on emba with git mirroring. The job you are
> referring to ran on top of:
>
> commit 87cf30fba37346a179c6307a29d5d39b39311cef
> Author: Basil L. Contovounesios <contovob <at> tcd.ie>
> Date:   Fri Jan 19 13:50:29 2024 +0100
>
>     Further shrink eglot--{}
>
> We are working on bringing emba back to recent.
>
> Best regards, Michael.

My mistake.

Anyway I still see it in my own tests today with a8cfe3bda8b.
Bisect says the first commit to cause the failure in
keymap-tests is 54d3de64e19.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Thu, 25 Jan 2024 17:52:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Mon, 29 Jan 2024 23:02:03 GMT) Full text and rfc822 format available.

Message #41 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Mekeor Melire <mekeor <at> posteo.de>
To: 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Mon, 29 Jan 2024 22:53:45 +0000
Hello, I just wanted to share a work-around for this bug, even though it
is probably bad for performance:

	(setopt native-comp-enable-subr-trampolines nil)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Tue, 30 Jan 2024 12:24:01 GMT) Full text and rfc822 format available.

Message #44 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mekeor Melire <mekeor <at> posteo.de>, Andrea Corallo <acorallo <at> gnu.org>
Cc: 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50;
 Invalid hash table test: tab-bar--auto-width-hash-test
Date: Tue, 30 Jan 2024 14:22:48 +0200
> From: Mekeor Melire <mekeor <at> posteo.de>
> Date: Mon, 29 Jan 2024 22:53:45 +0000
> 
> Hello, I just wanted to share a work-around for this bug, even though it
> is probably bad for performance:
> 
> 	(setopt native-comp-enable-subr-trampolines nil)

Can someone please post a recipe for reproducing this?  Does this
happen if you say "make bootstrap"?

Adding Andrea in case he has some comments or ideas.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Tue, 30 Jan 2024 16:14:01 GMT) Full text and rfc822 format available.

Message #47 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Mekeor Melire <mekeor <at> posteo.de>, Andrea Corallo <acorallo <at> gnu.org>,
 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Tue, 30 Jan 2024 08:55:49 -0600
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Mekeor Melire <mekeor <at> posteo.de>
>> Date: Mon, 29 Jan 2024 22:53:45 +0000
>> 
>> Hello, I just wanted to share a work-around for this bug, even though it
>> is probably bad for performance:
>> 
>> 	(setopt native-comp-enable-subr-trampolines nil)
>
> Can someone please post a recipe for reproducing this?  Does this
> happen if you say "make bootstrap"?

This most reliable way to reproduce it for me is:

  git clone https://git.savannah.gnu.org/git/emacs.git
  cd emacs
  make bootstrap
  make test/src/keymap-tests.log

It reproduces on 32 & 64bit systems, x86_64, armv7l and aarch64.
The problem first shows up with keymap-tests in 54d3de64e19.
Attached is the keymap-tests.log.

[keymap-tests.log (text/plain, attachment)]

Merged 68668 68821. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 30 Jan 2024 16:49:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Tue, 30 Jan 2024 21:54:02 GMT) Full text and rfc822 format available.

Message #52 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <acorallo <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: Mekeor Melire <mekeor <at> posteo.de>, Eli Zaretskii <eliz <at> gnu.org>,
 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Tue, 30 Jan 2024 16:52:42 -0500
john muhl <jm <at> pub.pink> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Mekeor Melire <mekeor <at> posteo.de>
>>> Date: Mon, 29 Jan 2024 22:53:45 +0000
>>> 
>>> Hello, I just wanted to share a work-around for this bug, even though it
>>> is probably bad for performance:
>>> 
>>> 	(setopt native-comp-enable-subr-trampolines nil)
>>
>> Can someone please post a recipe for reproducing this?  Does this
>> happen if you say "make bootstrap"?
>
> This most reliable way to reproduce it for me is:
>
>   git clone https://git.savannah.gnu.org/git/emacs.git
>   cd emacs
>   make bootstrap
>   make test/src/keymap-tests.log
>
> It reproduces on 32 & 64bit systems, x86_64, armv7l and aarch64.
> The problem first shows up with keymap-tests in 54d3de64e19.
> Attached is the keymap-tests.log.

I can reproduce this recipe, smells of some some function being moked
that the native compiler needs in order to work.  I'll try to have a
look.

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 09:57:02 GMT) Full text and rfc822 format available.

Message #55 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <acorallo <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: Mekeor Melire <mekeor <at> posteo.de>, Eli Zaretskii <eliz <at> gnu.org>,
 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 04:56:02 -0500
Andrea Corallo <acorallo <at> gnu.org> writes:

> john muhl <jm <at> pub.pink> writes:
>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>>>> From: Mekeor Melire <mekeor <at> posteo.de>
>>>> Date: Mon, 29 Jan 2024 22:53:45 +0000
>>>>
>>>> Hello, I just wanted to share a work-around for this bug, even though it
>>>> is probably bad for performance:
>>>>
>>>> 	(setopt native-comp-enable-subr-trampolines nil)
>>>
>>> Can someone please post a recipe for reproducing this?  Does this
>>> happen if you say "make bootstrap"?
>>
>> This most reliable way to reproduce it for me is:
>>
>>   git clone https://git.savannah.gnu.org/git/emacs.git
>>   cd emacs
>>   make bootstrap
>>   make test/src/keymap-tests.log
>>
>> It reproduces on 32 & 64bit systems, x86_64, armv7l and aarch64.
>> The problem first shows up with keymap-tests in 54d3de64e19.
>> Attached is the keymap-tests.log.
>
> I can reproduce this recipe, smells of some some function being moked
> that the native compiler needs in order to work.  I'll try to have a
> look.
>
>   Andrea

Okay investigation in progress, here a minimal reproducer:

(describe-buffer-bindings (current-buffer))
(comp-trampoline-compile 'message)

What is going on is that for some reason after calling
'describe-buffer-bindings' an hash table with
'tab-bar--auto-width-hash-test' as test is leaked into the compilation
environment.

As this is passed to the spawned process we fail as there
'tab-bar--auto-width-hash-test' is not defined.

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 10:15:01 GMT) Full text and rfc822 format available.

Message #58 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <acorallo <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: Mekeor Melire <mekeor <at> posteo.de>, Eli Zaretskii <eliz <at> gnu.org>,
 Mattias Engdegård <mattias.engdegard <at> gmail.com>,
 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 05:13:49 -0500
Andrea Corallo <acorallo <at> gnu.org> writes:

> Andrea Corallo <acorallo <at> gnu.org> writes:
>
>> john muhl <jm <at> pub.pink> writes:
>>
>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>>
>>>>> From: Mekeor Melire <mekeor <at> posteo.de>
>>>>> Date: Mon, 29 Jan 2024 22:53:45 +0000
>>>>>
>>>>> Hello, I just wanted to share a work-around for this bug, even though it
>>>>> is probably bad for performance:
>>>>>
>>>>> 	(setopt native-comp-enable-subr-trampolines nil)
>>>>
>>>> Can someone please post a recipe for reproducing this?  Does this
>>>> happen if you say "make bootstrap"?
>>>
>>> This most reliable way to reproduce it for me is:
>>>
>>>   git clone https://git.savannah.gnu.org/git/emacs.git
>>>   cd emacs
>>>   make bootstrap
>>>   make test/src/keymap-tests.log
>>>
>>> It reproduces on 32 & 64bit systems, x86_64, armv7l and aarch64.
>>> The problem first shows up with keymap-tests in 54d3de64e19.
>>> Attached is the keymap-tests.log.
>>
>> I can reproduce this recipe, smells of some some function being moked
>> that the native compiler needs in order to work.  I'll try to have a
>> look.
>>
>>   Andrea
>
> Okay investigation in progress, here a minimal reproducer:
>
> (describe-buffer-bindings (current-buffer))
> (comp-trampoline-compile 'message)
>
> What is going on is that for some reason after calling
> 'describe-buffer-bindings' an hash table with
> 'tab-bar--auto-width-hash-test' as test is leaked into the compilation
> environment.
>
> As this is passed to the spawned process we fail as there
> 'tab-bar--auto-width-hash-test' is not defined.
>
>   Andrea


Okay something very wierd hash related is going on here:

If I evaluate:

(progn
  (describe-buffer-bindings (current-buffer))
  (require 'comp)
  (make-comp-data-container))

I get

#s(comp-data-container nil #s(hash-table test tab-bar--auto-width-hash-test))

In place of the expected

#s(comp-data-container nil #s(hash-table test comp-imm-equal-test))

Adding Mattias in Cc.

Thanks

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 10:31:02 GMT) Full text and rfc822 format available.

Message #61 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Andrea Corallo <acorallo <at> gnu.org>
Cc: Mekeor Melire <mekeor <at> posteo.de>, Eli Zaretskii <eliz <at> gnu.org>,
 john muhl <jm <at> pub.pink>,
 Mattias Engdegård <mattias.engdegard <at> gmail.com>,
 68668 <at> debbugs.gnu.org
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 11:29:58 +0100
Andrea Corallo <acorallo <at> gnu.org> writes:

> Okay something very wierd hash related is going on here:
>
> If I evaluate:
>
> (progn
>   (describe-buffer-bindings (current-buffer))
>   (require 'comp)
>   (make-comp-data-container))
>
> I get
>
> #s(comp-data-container nil #s(hash-table test tab-bar--auto-width-hash-test))
>
> In place of the expected
>
> #s(comp-data-container nil #s(hash-table test comp-imm-equal-test))

That's get_hash_table_user_test in fns.c which only keeps the first
occurrence of user-defined hash tests which have the same definition.
Pretty confusing, IMO.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 11:56:01 GMT) Full text and rfc822 format available.

Message #64 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Mekeor Melire <mekeor <at> posteo.de>, john muhl <jm <at> pub.pink>,
 68668 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 12:55:05 +0100
31 jan. 2024 kl. 11.29 skrev Gerd Möllmann <gerd.moellmann <at> gmail.com>:

> That's get_hash_table_user_test in fns.c which only keeps the first
> occurrence of user-defined hash tests which have the same definition.

Oops, sorry about that. Thank you for finding this anomaly!

It's indeed a bit unexpected. It doesn't affect hash table operations as such, only the output of `hash-table-test` and the print representation. However, this means that a hash table couldn't be deserialised under some circumstances, which is a problem.

A correction has been pushed (7e85311a911).

I'm still not really satisfied with the current implementation of user-defined tests. I have a patch which turns hash-table tests into Lisp objects but it seems to slow down basic operations for some reason which is why I haven't used it yet.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 13:06:01 GMT) Full text and rfc822 format available.

Message #67 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: Mekeor Melire <mekeor <at> posteo.de>, john muhl <jm <at> pub.pink>,
 68668 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 14:05:15 +0100
Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:

> A correction has been pushed (7e85311a911).

Probably dumb question: why not reuse an existing entry for a given
name?
     




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 13:20:02 GMT) Full text and rfc822 format available.

Message #70 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Mekeor Melire <mekeor <at> posteo.de>, john muhl <jm <at> pub.pink>,
 68668 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 14:18:57 +0100
31 jan. 2024 kl. 14.05 skrev Gerd Möllmann <gerd.moellmann <at> gmail.com>:

> why not reuse an existing entry for a given name?

We mustn't violate invariants of existing hash-table objects when the test is redefined. Consider:

(define-hash-table-test 'mytest #'cmp1 #'hash1)
(setq h (make-hash-table :test 'mytest))
...
(define-hash-table-test 'mytest #'cmp2 #'hash2)
; h must still use cmp1 and hash1 at this point





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 13:36:02 GMT) Full text and rfc822 format available.

Message #73 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: Mekeor Melire <mekeor <at> posteo.de>, john muhl <jm <at> pub.pink>,
 68668 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 14:34:52 +0100
Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:

> 31 jan. 2024 kl. 14.05 skrev Gerd Möllmann <gerd.moellmann <at> gmail.com>:
>
>> why not reuse an existing entry for a given name?
>
> We mustn't violate invariants of existing hash-table objects when the
> test is redefined. Consider:
>
> (define-hash-table-test 'mytest #'cmp1 #'hash1)
> (setq h (make-hash-table :test 'mytest))
> ...
> (define-hash-table-test 'mytest #'cmp2 #'hash2)
> ; h must still use cmp1 and hash1 at this point

But that also means that we end up with two sorts of hash-tables that
behave differently, without us being able to tell them apart, because
hash-table-test returns 'mytest for both. I think I'd prefer if that
were not the case, and the redefinition would apply to both. If an old
hash-table then behaves stragely, I know what's up, and can empty it, if
it isn't still empty in the first place.

Just my 2 cents.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 14:18:02 GMT) Full text and rfc822 format available.

Message #76 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Mekeor Melire <mekeor <at> posteo.de>, john muhl <jm <at> pub.pink>,
 68668 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 15:17:33 +0100
31 jan. 2024 kl. 14.34 skrev Gerd Möllmann <gerd.moellmann <at> gmail.com>:

> But that also means that we end up with two sorts of hash-tables that
> behave differently, without us being able to tell them apart, because
> hash-table-test returns 'mytest for both.

This is how elisp hash tables worked in Emacs 29; I didn't change that part, I think.

> I think I'd prefer if that
> were not the case, and the redefinition would apply to both. If an old
> hash-table then behaves stragely, I know what's up, and can empty it, if
> it isn't still empty in the first place.

I'm not really happy with that sort of spooky action at a distance because it makes it too easy not only to introduce mysterious behaviour but also violate invariants that the C implementation relies upon for the management of an internal data structure.

That said, it is true that Lisp permits retroactive dynamism in several places even with the current design: the test and hash functions can both be redefined, and of course all code in Lisp is potentially impure and can change behaviour when its environment changes.

I still believe the current semantics cause fewer user headaches on balance. In any case, it probably should be documented in the `define-hash-table-test` doc string.

But you do raise an interesting point, thank you!





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 14:45:01 GMT) Full text and rfc822 format available.

Message #79 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: Mekeor Melire <mekeor <at> posteo.de>, john muhl <jm <at> pub.pink>,
 68668 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 15:44:25 +0100
Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:

> 31 jan. 2024 kl. 14.34 skrev Gerd Möllmann <gerd.moellmann <at> gmail.com>:
>
>> But that also means that we end up with two sorts of hash-tables that
>> behave differently, without us being able to tell them apart, because
>> hash-table-test returns 'mytest for both.
>
> This is how elisp hash tables worked in Emacs 29; I didn't change that
> part, I think.

That's true, and probably a good enough reason not to change it.

BTW, your fix also fixed keymap_tests.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 15:07:01 GMT) Full text and rfc822 format available.

Message #82 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: mekeor <at> posteo.de, mattias.engdegard <at> gmail.com, jm <at> pub.pink,
 68668 <at> debbugs.gnu.org, acorallo <at> gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#68668: 30.0.50; Invalid hash table test:
 tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 17:05:42 +0200
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Cc: Andrea Corallo <acorallo <at> gnu.org>,  john muhl <jm <at> pub.pink>,  Mekeor
>  Melire <mekeor <at> posteo.de>,  Eli Zaretskii <eliz <at> gnu.org>,
>   68668 <at> debbugs.gnu.org,  Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Wed, 31 Jan 2024 15:44:25 +0100
> 
> BTW, your fix also fixed keymap_tests.

If there's a bug open for that, please close it, and thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68668; Package emacs. (Wed, 31 Jan 2024 15:15:01 GMT) Full text and rfc822 format available.

Message #85 received at 68668 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mekeor <at> posteo.de, mattias.engdegard <at> gmail.com, jm <at> pub.pink,
 68821 <at> debbugs.gnu.org, 68668 <at> debbugs.gnu.org, acorallo <at> gnu.org,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#68821: Native compile error when activating
 rectangle-mark-mode
Date: Wed, 31 Jan 2024 16:14:18 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
>> Cc: Andrea Corallo <acorallo <at> gnu.org>,  john muhl <jm <at> pub.pink>,  Mekeor
>>  Melire <mekeor <at> posteo.de>,  Eli Zaretskii <eliz <at> gnu.org>,
>>   68668 <at> debbugs.gnu.org,  Stefan Monnier <monnier <at> iro.umontreal.ca>
>> Date: Wed, 31 Jan 2024 15:44:25 +0100
>> 
>> BTW, your fix also fixed keymap_tests.
>
> If there's a bug open for that, please close it, and thanks.

It's this one, so I'm closing it.




bug marked as fixed in version 30.1, send any further explanations to 68821 <at> debbugs.gnu.org and Johann Höchtl <johann.hoechtl <at> gmail.com> Request was from Gerd Möllmann <gerd.moellmann <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 31 Jan 2024 15:15:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 29 Feb 2024 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 172 days ago.

Previous Next


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