Closed 3tieto closed 9 months ago
❯ RUST_BACKTRACE=1 cargo test -Favx2 -- --nocapture
Finished test [unoptimized + debuginfo] target(s) in 0.12s
Running unittests src/lib.rs (target/debug/deps/gxhash-db5f87006ff816b7)
running 20 tests
error: test failed, to rerun pass `--lib`
Caused by:
process didn't exit successfully: `/root/git/gxhash/target/debug/deps/gxhash-db5f87006ff816b7 --nocapture` (signal: 4, SIGILL: illegal instruction)
Hi @3tieto,
On which branch are you? Are you on latest main?
This bug is supposed to be fixed since 2.3.0. There is even a test for it cargo test hasher_handles_empty_inputs --features avx2
If I run cargo bench --no-fail-fast -F=avx2
I do not have any issue on my end
❯ git log -1
commit 8e109d97538ca95123ba73368fba18bb54d90005 (HEAD -> main, tag: 2.3.0, origin/main, origin/HEAD)
Author: Olivier Giniaux <oginiaux@gmail.com>
Date: Sun Dec 10 10:53:04 2023 +0100
Add Hasher write_x primitives (#42)
* Add specialized write_u32
* Fix hashset benchmark accurracy
* Implement all types
* Fix build
* Fix avx2
* Add mandatory 0 length check to avoid SIGSEGV and add test
* Version 2.3.0
---------
Co-authored-by: Olivier Giniaux <oginiaux@smartadserver.com>
❯ rm -rf target
Is it running in a virtualized environment? (I see QEMU) Also, are other tests passing? (If you comment out hasher_handles_empty_inputs)
i create a tmp user for this error just ❯ ssh tmp@38.242.220.222 password PXeF5q53u9vo
cd ~/gxhash run test
Thx for the SSH.
The issue is that your machine does not support VAES:
See on my machine I have this flag:
The avx2
check is not sufficient. I thought avx2
implied vaes
, but it seems it's not always the case. A check must be added in the code.
https://github.com/ogxd/gxhash/blob/8e109d97538ca95123ba73368fba18bb54d90005/src/gxhash/platform/mod.rs#L5
I'll patch this by adding the vaes
check, even though the flag will remain named avx2
(which is misleading now)
This should be enough given that there won't be avx2
feature flag anymore with the hybrid gxhash https://github.com/ogxd/gxhash/issues/34
I look forward to the release of hybrid.