-
Notifications
You must be signed in to change notification settings - Fork 310
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
Build fails with clang 7: invalid operand for instruction #60
Comments
This was seen when trying to fix #58 in ccache/ccache#519 by switching to the assembly implementation. |
This is this clang bug, running from version 5 to 7. It will need replacing A quick fix would replace every instance of |
I tried the following snippet to move all labels +1:
Which compiled. But then when running the test it failed with:
This happens with both clang 7 and 8. Also seen when testing the asm branch. GCC works. |
That crash had nothing to do with the assembly, and things were working by chance everywhere. I accidentally deleted the x86_64 path for The fix for this is already in the |
Thanks, seems to be working! |
This release is motivated by a fix for a potential security vulnerability. 421a21a fixes a bug introduced in a1c4c4e. A truncated pointer register led to a segfault on x86-64 under Clang 7 and 8. Clang 9 happens to be unaffected, but the behavior is undefined in general. See also: #60 (comment) The C implementation of BLAKE3 hasn't been formally packaged anywhere, and most callers vendor code from master. This release tag is intended to make the fix above more visible, to encourage callers to update their vendored copies. We will continue to publish tags like this whenever bugs in the C implementation are fixed, or if there are any incompatible API changes. Note that the issue above does not impact callers of the Rust `blake3` crate. The affected file, `blake3_dispatch.c`, is not compiled by that crate in any configuration. It does impact callers of the internal `blake3_c_rust_bindings` crate, but that crate is not published on crates.io and not intended for production use.
When trying to build the assembly variant of the latest master with clang 7 it fails:
Clang 8 works as expected.
The text was updated successfully, but these errors were encountered: