unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46111: Reverting fns.c hash function due to OpenBSD/SPARC64 compile breaking
@ 2021-01-26  6:37 Ahmed Khanzada
  2021-01-26  6:57 ` Ahmed Khanzada
  2021-01-26  9:36 ` Philipp Stephani
  0 siblings, 2 replies; 23+ messages in thread
From: Ahmed Khanzada @ 2021-01-26  6:37 UTC (permalink / raw)
  To: 46111

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
bGUgY2hhbmdlZCwgNyBpbnNlcnRpb25zKCspLCAyNSBkZWxldGl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ICAgICAgcCArPSBzdGVwOworICAg
ICAgYyA9ICpwKys7CiAgICAgICBoYXNoID0gc3hoYXNoX2NvbWJpbmUgKGhhc2gsIGMpOwogICAg
IH0KLSAgaWYgKHAgPCBlbmQpCi0gICAgeyAvKiBBIGZldyBsYXN0IGJ5dGVzIHJlbWFpbiAoc21h
bGxlciB0aGFuIGFuIEVNQUNTX1VJTlQpLiAgKi8KLSAgICAgIC8qIEZJWE1FOiBXZSBjb3VsZCBk
byB0aGlzIHdpdGhvdXQgYSBsb29wLCBidXQgaXQnZCByZXF1aXJlCi0gICAgICAgICBlbmRpYW4t
ZGVwZW5kZW50IGNvZGUgOi0oICAqLwotICAgICAgY2hhciBjb25zdCAqcDEgPSAoY2hhciBjb25z
dCAqKXA7Ci0gICAgICBjaGFyIGNvbnN0ICplbmQxID0gKGNoYXIgY29uc3QgKillbmQ7Ci0gICAg
ICBkbwotICAgICAgICB7Ci0gICAgICAgICAgdW5zaWduZWQgY2hhciBjID0gKnAxKys7Ci0gICAg
ICAgICAgaGFzaCA9IHN4aGFzaF9jb21iaW5lIChoYXNoLCBjKTsKLSAgICAgICAgfQotICAgICAg
d2hpbGUgKHAxIDwgZW5kMSk7Ci0gICAgfQogCiAgIHJldHVybiBoYXNoOwogfQotLSAKMi4yOC4w
Cgo=





^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-01-28 17:30 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26  6:37 bug#46111: Reverting fns.c hash function due to OpenBSD/SPARC64 compile breaking Ahmed Khanzada
2021-01-26  6:57 ` 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

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).