Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid non-trivial global constants in SHA-NI code #956

Merged
merged 1 commit into from
May 27, 2021

Conversation

Zannick
Copy link
Collaborator

@Zannick Zannick commented May 23, 2021

This is a cherry-pick of bitcoin/bitcoin#18553 fixing bitcoin/bitcoin#18456 which suddenly cropped up on my linux 18.04 machine.

Problem

Certain linux configurations may encounter a SIGILL Illegal Instruction that causes a locally-built veild to crash immediately. Using gdb to catch the stack trace will give a reference to global variable initialization in the sha256_shani.cpp file. Root cause appears to be a global constant is not produced correctly by the compiler as a constant.

Solution

Cherry-pick bitcoin's solution to the same problem.

Testing

Verified that veild (regtest) is now able to run on the machine where this issue occurred.

Copy link
Collaborator

@CaveSpectre11 CaveSpectre11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 9c98451

Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9c98451

@codeofalltrades codeofalltrades merged commit 8736fc7 into Veil-Project:master May 27, 2021
@Zannick Zannick deleted the shani branch October 22, 2021 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants