RustCrypto / asm-hashes

Assembly implementations of cryptographic hash functions
46 stars 26 forks source link

md5 `thread 'main' has overflowed its stack` #62

Closed MaxKingPor closed 1 year ago

MaxKingPor commented 1 year ago

clang version 16.0.0 Target: x86_64-pc-windows-msvc Thread model: posix

# Example
``` Rust
use ::md5::{Digest, Md5};

fn main() {
    println!("start md5");
    let mut m5: Md5 = Md5::new();
    m5.update(
        b"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    );
    println!("{:x}", m5.finalize())
}
tarcieri commented 1 year ago

While we could try to find a fix specific to this issue, our long-term plan is to migrate to inline ASM (#45) in order to mitigate all of these environment-specific concerns around inline ASM

newpavlov commented 1 year ago

Can you check whether https://github.com/RustCrypto/asm-hashes/pull/61 helps? Otherwise, the asm-hashes crates do not quite work on Windows and effectively are in a semi-deprecated state.

mati865 commented 1 year ago

I think this might not work with MSVC, mentioned PR fixes it for GNU which has slightly different ABI.

tarcieri commented 1 year ago

Oh right, we have a tracking issue for MSVC: #17

newpavlov commented 1 year ago

Closing as dup of #17.