You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am currently trying to build and run this project on Windows 10, but I am experiencing a segmentation fault in sha1_compress().
I am neither familiar with Rust nor with building and debugging of native applications, so maybe I made a mistake during some of the steps, any hints are appreciated.
Initially running cargo build --release --no-default-features failed compiling sha1-asm with an error similar to what is described in MSVC support RustCrypto/asm-hashes#17. Therefore I uninstalled Rust with MSVC ABI and reinstalled it with GNU ABI.
Then the build failed with
error: failed to run custom build command for `sha1-asm v0.4.4`
...
error occurred: Failed to find tool. Is `gcc.exe` installed? (see https://github.com/alexcrichton/cc-rs#compile-time-requirements for help)
I followed that link, installed MSYS2 MinGW with gcc.
The build still failed with the same error so I added C:\msys64\mingw64\bin (containing gcc) to the PATH environment variable.
At some point I also got cannot find -lOpenCL, but that seems to be resolved now after I installed the NVIDIA Cuda Toolkit (and tinkered with the .cargo/config file?).
cargo build --release and cargo install lucky_commit --locked (for commit 0000000) both now succeed.
Running lucky_commit.exe within my local clone of this repository exits without any feedback.
The exit code is -1073741819 (0xC0000005).
Running it with too many arguments, e.g. lucky_commit.exe a b works correctly, it prints the usage help and has exit code 1.
Using gdb.exe lucky_commit.exe from the MSYS terminal with export RUST_BACKTRACE=full shows:
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff63e52bc31 in sha1_compress ()
(gdb) bt
#0 0x00007ff63e52bc31 in sha1_compress ()
#1 0x00007ff9979747b1 in ntdll!RtlFreeHeap ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#2 0x00007ff63e4bb68c in lucky_commit::HashSearchWorker::search ()
#3 0x00007ff63e4a3106 in lucky_commit::run_lucky_commit ()
#4 0x00007ff63e4a1d20 in lucky_commit::main ()
#5 0x00007ff63e4daea6 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#6 0x00007ff63e4a7b87 in main ()
Do you have an idea what I might be doing wrong, or do you need more information?
The text was updated successfully, but these errors were encountered:
Hi, thanks for the detailed report. Unfortunately I'm not sure what the problem is, but my best guess is that the segfault is coming from the ASM sha1 hash implementation. It might be related to the MSVC issue you linked.
If you just want to get lucky-commit working, I think cargo install lucky_commit --features=sha-1/force-soft might work, since it causes the rust implementation of SHA1 to get used rather than the assembly implementation.
Hello,
I am currently trying to build and run this project on Windows 10, but I am experiencing a segmentation fault in
sha1_compress()
.I am neither familiar with Rust nor with building and debugging of native applications, so maybe I made a mistake during some of the steps, any hints are appreciated.
cargo build --release --no-default-features
failed compilingsha1-asm
with an error similar to what is described in MSVC support RustCrypto/asm-hashes#17. Therefore I uninstalled Rust with MSVC ABI and reinstalled it with GNU ABI.gcc
.C:\msys64\mingw64\bin
(containinggcc
) to thePATH
environment variable.cannot find -lOpenCL
, but that seems to be resolved now after I installed the NVIDIA Cuda Toolkit (and tinkered with the.cargo/config
file?).cargo build --release
andcargo install lucky_commit --locked
(for commit 0000000) both now succeed.lucky_commit.exe
within my local clone of this repository exits without any feedback.The exit code is -1073741819 (0xC0000005).
Running it with too many arguments, e.g.
lucky_commit.exe a b
works correctly, it prints the usage help and has exit code 1.gdb.exe lucky_commit.exe
from the MSYS terminal withexport RUST_BACKTRACE=full
shows:Do you have an idea what I might be doing wrong, or do you need more information?
The text was updated successfully, but these errors were encountered: