alexcrichton / alexcrichton/openssl-src-rs

Runtime failure with i686-unknown-linux-musl

未关闭
#86 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
80
派生
131
平均合并
49 分钟
30 天内合并 PR
2

描述

`src/main.rs`:

```rust
fn main() {
use openssl::ssl::{SslMethod, SslConnector};
use std::io::{Read, Write};
use std::net::TcpStream;

let mut cb = SslConnector::builder(SslMethod::tls()).unwrap();
cb.set_verify(openssl::ssl::SslVerifyMode::NONE);
let connector = cb.build();

let stream = TcpStream::connect("example.com:443").unwrap();
let mut stream = connector.connect("example.com", stream).unwrap();

stream.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap();
let mut res = vec![];
stream.read_to_end(&mut res).unwrap();
println!("{}", String::from_utf8_lossy(&res));
}
```

`Cargo.toml`:

```
[package]
name = "osslvtest"
version = "0.1.0"
authors = []
edition = "2018"

[dependencies]
openssl = { version = "0.10.32", features = ["vendored"] }
```

Run attempt:

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ErrorStack([Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 336236609, library: "SSL routines", function: "SSL_CTX_new", reason: "malloc failure", file: "ssl/ssl_lib.c", line: 3147 }])', src/main.rs:6:58
```

Does not happen with non-musl i686 or with x86_64 musl build. `arm-unknown-linux-musleabi` also works.

Trying with `RUSTFLAGS='-C link-arg=-Wl,-z,stack-size=0x1000000'` does not lead to improvement.

`rustc 1.49.0 (e1884a8e3 2020-12-29)`, `cargo 1.49.0 (d00d64df9 2020-12-05)`.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。