From: Ahmed Khanzada <me@enzu.ru>
To: 46111@debbugs.gnu.org
Subject: bug#46111: Reverting fns.c hash function due to OpenBSD/SPARC64 compile breaking
Date: Mon, 25 Jan 2021 22:37:53 -0800 [thread overview]
Message-ID: <87sg6oyzi6.wl-me@enzu.ru> (raw)
I'm not an expert on C, OpenBSD, or SPARC64, but I did notice
emacs-current was not compiling.
During a gmake, bootstrap-emacs would get a SIGBUS and fail. Running
gdb led me to the hash_string function where it seemed to be failing.
Reverting the hash_string function to a previous version seems to have
fixed the issue.
If I had to guess, it may have something to do with SPARC64 alignment.
I don't have an updated AMD64 OpenBSD box running at the moment, but if you
would like me to test there, I could find a way.
I understand that reverting this function might not be the best way
forward, but wrote a patch just in case that reverts hash_string to an
earlier version that compiles on OpenBSD/SPARC64.
I am already signed all my GNU contributor docs.
--[[text/plain; type=patch; name="0001-Reverting-hash_string-function-due-to-problem-on-Ope.patch"
Content-Disposition: attachment; filename="0001-Reverting-hasattach filh_string-function-due-to-problem-on-Ope.patch"][base64]]
RnJvbSBkOTM4NzQ1Y2U1NjA1OGJlMjQwNzhlYzUyZDk3Mzk4Njk3ZGI0Yjc2IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBBaG1lZCBLaGFuemFkYSA8bWVAZW56dS5ydT4KRGF0ZTogTW9u
LCAyNSBKYW4gMjAyMSAyMToxNjo0OCAtMDgwMApTdWJqZWN0OiBbUEFUQ0hdIFJldmVydGluZyBo
YXNoX3N0cmluZyBmdW5jdGlvbiBkdWUgdG8gcHJvYmxlbSBvbgogT3BlbkJTRC9TUEFSQzY0Cgot
LS0KIHNyYy9mbnMuYyB8IDMyICsrKysrKystLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAxIGZp
bGUgY2hhbmdlZCwgNyBpbnNlcnRpb25zKCspLCAyNSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQg
YS9zcmMvZm5zLmMgYi9zcmMvZm5zLmMKaW5kZXggN2FiMmU4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UgKGhhc2gsIGMpOwogICAg
IH0KLSAgaWYgKHAgPCBlbmQpCi0gICAgeyAvKiBBIGZldyBsYXN0IGJ5dGVzIHJlbWFpbiAoc21h
bGxlciB0aGFuIGFuIEVNQUNTX1VJTlQpLiAgKi8KLSAgICAgIC8qIEZJWE1FOiBXZSBjb3VsZCBk
byB0aGlzIHdpdGhvdXQgYSBsb29wLCBidXQgaXQnZCByZXF1aXJlCi0gICAgICAgICBlbmRpYW4t
ZGVwZW5kZW50IGNvZGUgOi0oICAqLwotICAgICAgY2hhciBjb25zdCAqcDEgPSAoY2hhciBjb25z
dCAqKXA7Ci0gICAgICBjaGFyIGNvbnN0ICplbmQxID0gKGNoYXIgY29uc3QgKillbmQ7Ci0gICAg
ICBkbwotICAgICAgICB7Ci0gICAgICAgICAgdW5zaWduZWQgY2hhciBjID0gKnAxKys7Ci0gICAg
ICAgICAgaGFzaCA9IHN4aGFzaF9jb21iaW5lIChoYXNoLCBjKTsKLSAgICAgICAgfQotICAgICAg
d2hpbGUgKHAxIDwgZW5kMSk7Ci0gICAgfQogCiAgIHJldHVybiBoYXNoOwogfQotLSAKMi4yOC4w
Cgo=
next reply other threads:[~2021-01-26 6:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 6:37 Ahmed Khanzada [this message]
2021-01-26 6:57 ` bug#46111: Reverting fns.c hash function due to OpenBSD/SPARC64 compile breaking Ahmed Khanzada
2021-01-26 11:15 ` Eli Zaretskii
2021-01-28 4:06 ` Ahmed Khanzada
2021-01-28 13:58 ` Eli Zaretskii
2021-01-28 15:09 ` Stefan Monnier
2021-01-28 15:19 ` Eli Zaretskii
2021-01-28 15:44 ` Stefan Monnier
2021-01-28 15:52 ` Stefan Monnier
2021-01-28 16:17 ` Stefan Monnier
2021-01-28 16:22 ` Andreas Schwab
2021-01-28 17:22 ` Eli Zaretskii
2021-01-28 17:30 ` Stefan Monnier
2021-01-28 16:04 ` Andreas Schwab
2021-01-28 16:14 ` Stefan Monnier
2021-01-26 9:36 ` Philipp Stephani
2021-01-26 11:12 ` Eli Zaretskii
2021-01-26 11:17 ` Andreas Schwab
2021-01-26 11:43 ` Eli Zaretskii
2021-01-26 11:49 ` Andreas Schwab
2021-01-26 15:36 ` Eli Zaretskii
2021-01-27 7:42 ` Richard Stallman
2021-01-27 8:24 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg6oyzi6.wl-me@enzu.ru \
--to=me@enzu.ru \
--cc=46111@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).