-
Notifications
You must be signed in to change notification settings - Fork 14
Fix floating point exception error #20
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
Conversation
Thanks for the contribution @LegendGaf ! |
b8b9152
to
113be18
Compare
@LegendGaf the problem seems to persist on certain system. When shai is compiled directly on those system it works, but the prebuild binary, with or without your added flag, seems to still crash. I believe it is related to libssl as the crash happens when it tries to perform a ssl query. I can't replicate myself but here is a crash strace from someone having the issue, it happened on startup when the app starts without config file (and tries to pull it from github raw file default .shai.config):
It seems to be a linker problem indeed, any ideas? |
I see ! I have already encountered a similar problem. I will look into it in more detail and propose a solution |
Some new Intel/AMD CPUs that support SHA-NI instructions crash with a "floating point exception" when running binaries statically linked against old OpenSSL versions (like 1.0.2k). => [OpenSSL* SHA Crash Bug Requires Application Update](https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/openssl-sha-crash-bug-requires-application-update.html?utm_source=chatgpt.com) - Using `vendored` features in `openssl` and `native-tls` will force static linking with a modern OpenSSL (>=1.1.1), built from source, this should fix the issue. Signed-off-by: Gafaiti Aymane [email protected]
6846c76
to
4188e3d
Compare
The issue still persists even though it is statically linked. Maybe we should find a way to reproduce the issue first in a controlled environment. |
Sad that the fix didn’t help, It did allow me and some colleagues to build and run it locally using this patch even though it’s no longer fully statically linked, with this change, we’re not using OpenSSL from local libs anymore, which we suspected was the cause of the issue with . |
I think that the release is done by the github CI. |
Before the patch
After the use of musl
|
to fix new build issue
42a5e51
to
b4743bd
Compare
If this fixes the issue of "floating point exception error" Ii will rebase info one commit before merge |
I added a github action and build your change here: https://github.com/nicoovh/shai/actions/runs/16619600496/job/47020540925 |
Thanks @LegendGaf for this PR ! I'll make a release tonight :) |
Passing -Wl,--hash-style=both keeps the .hash section alongside .gnu.hash so fully static glibc builds run on older loaders instead of aborting with SIGFPE on start‑up.
Signed-off-by: Gafaiti Aymane [email protected]