emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPS: dangling markers


From: Pip Cet
Subject: Re: MPS: dangling markers
Date: Mon, 01 Jul 2024 21:08:07 +0000

On Monday, July 1st, 2024 at 18:56, Eli Zaretskii <eliz@gnu.org> wrote:
> The 32-bit build of the branch is now broken: dumping dies with

Sorry, it took me a while to reproduce this because the default build worked 
fine, I had to --enable-checking to get something like your error, though in my 
case it was clearly the set_weak_hash_hash_value call that was to blame.

I incorrectly assumed sxhash, Fsxhash, and the hash value in an equal-based 
hash table were all the same number; in reality, sxhash is 32 bits on a 32-bit 
system, 64 bits on a 64-bit system, Fsxhash is 30 bits on a 32-bit system, 62 
bits on a 64-bit system, and the hash value is 32 bits on all systems.

Long story short, would you be able to try this patch and see whether you get a 
clean dump? I do here...

diff --git a/src/lisp.h b/src/lisp.h
index 0f5a5410081..75146bd7715 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2997,7 +2997,7 @@ SXHASH_REDUCE (EMACS_UINT x)
 reduce_emacs_uint_to_hash_hash (EMACS_UINT x)
 {
   verify (sizeof x <= 2 * sizeof (hash_hash_t));
-  return (sizeof x == sizeof (hash_hash_t)
+  return 0x1fffffff & (sizeof x == sizeof (hash_hash_t)
          ? x
          : x ^ (x >> (8 * (sizeof x - sizeof (hash_hash_t)))));
 }

Obviously that's not a permanent fix.

Thanks
Pip

Attachment: 0004-mps-weak-hash-tables.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]