GNU bug report logs - #46111
Reverting fns.c hash function due to OpenBSD/SPARC64 compile breaking

Previous Next

Package: emacs;

Reported by: Ahmed Khanzada <me <at> enzu.ru>

Date: Tue, 26 Jan 2021 09:07:01 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ahmed Khanzada <me <at> enzu.ru>, Stefan Monnier <monnier <at> iro.umontreal.ca> 
Cc: 46111 <at> debbugs.gnu.org
Subject: Re: bug#46111: Reverting fns.c hash function due to OpenBSD/SPARC64
 compile breaking
Date: Thu, 28 Jan 2021 15:58:09 +0200
> From: Ahmed Khanzada <me <at> enzu.ru>
> Cc: 
> Date: Wed, 27 Jan 2021 20:06:01 -0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Thanks.  However, could you please show the C-level backtrace from the SIGBUS crash, as displayed by GDB?  I think we'd like to know which string has its data unaligned to cause this.
> 
> Is the log below the information that you are looking for?

Yes, thanks.

> 4613          EMACS_UINT c = *p;
> (gdb) next
> 
> Program received signal SIGBUS, Bus error.
> 0x000000455fe1dc6c in hash_string (ptr=0x47fa34d596 "DndProtocol",
> len=11) at fns.c:4613
> 4613          EMACS_UINT c = *p;
> (gdb) backtrace
> #0  0x000000455fe1dc6c in hash_string (ptr=0x47fa34d596 "DndProtocol",
> len=11) at fns.c:4613
> #1  0x000000455fe1dd48 in sxhash_string (ptr=0x47fa34d596 "DndProtocol",
> len=11) at fns.c:4640
> #2  0x000000455fe1e36c in sxhash_obj (obj=0x47fa02f0bc, depth=0) at
> fns.c:4759
> #3  0x000000455fe1e270 in sxhash (obj=0x47fa02f0bc) at fns.c:4741
> #4  0x000000455fe1c52c in hashfn_equal (key=0x47fa02f0bc,
> h=0x47fa02eff0) at fns.c:4096
> #5  0x000000455fe1cf44 in hash_table_rehash (hash=0x47fa02eff5) at
> fns.c:4342
> #6  0x000000455fdc5264 in hash_table_thaw (hash=0x47fa02eff5) at
> pdumper.c:2652
> #7  0x000000455fdcd184 in thaw_hash_tables () at pdumper.c:5477

Stefan, any ideas?

One possibility is to use memcpy instead of dereferencing a pointer.
We could do that either unconditionally or when the original pointer
is not aligned on 4/8-byte boundary.




This bug report was last modified 4 years and 117 days ago.

Previous Next


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