Closed
Description
RUSTFLAGS="-Cembed-bitcode=yes -Clto=fat -Cdebuginfo=2" cargo install cargo-make --force
thread 'main' panicked at 'index out of bounds: the len is 31 but the index is 18446744073709551615', library/core/src/unicode/unicode_data.rs:82:62
I forgot the --target=x86_64-unknown-linux-gnu
that would be required to make this actually work (build will eventually fail because LTO and proc-macro dylib crates). If I add the --target
, I don't see any crashes. About half the time I run the cargo install
invocation, I get a panic and the backtrace below (-Cdebuginfo=2
for the backtrace, doesn't seem related to the crash). I do not see this panic if I swap out -Clto=fat
for -Copt-level=3
.
Meta
rustc --version --verbose
:
rustc 1.52.0-nightly (234781afe 2021-03-07)
binary: rustc
commit-hash: 234781afe33d3f339b002f85f948046d8476cfc9
commit-date: 2021-03-07
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0
Backtrace
error: failed to run custom build command for `openssl-sys v0.9.60`
Caused by:
process didn't exit successfully: `/tmp/cargo-installjmgYde/release/build/openssl-sys-ad87746b93d0b377/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=OPENSSL_STATIC
cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=SYSROOT
cargo:rerun-if-env-changed=OPENSSL_STATIC
cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rustc-link-lib=ssl
cargo:rustc-link-lib=crypto
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=OPENSSL_STATIC
cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
thread 'main' panicked at 'index out of bounds: the len is 31 but the index is 18446744073709551615', library/core/src/unicode/unicode_data.rs:82:62
stack backtrace:
0: rust_begin_unwind
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/std/src/panicking.rs:493:5
1: core::panicking::panic_fmt
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/panicking.rs:92:14
2: core::panicking::panic_bounds_check
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/panicking.rs:69:5
3: core::unicode::unicode_data::skip_search::{{closure}}
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/unicode/unicode_data.rs:82:62
4: core::option::Option<T>::map
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/option.rs:487:29
5: core::unicode::unicode_data::skip_search
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/unicode/unicode_data.rs:82:9
6: core::unicode::unicode_data::grapheme_extend::lookup
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/unicode/unicode_data.rs:305:9
7: core::char::methods::<impl char>::is_grapheme_extended
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/char/methods.rs:859:9
8: core::char::methods::<impl char>::escape_debug_ext
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/char/methods.rs:415:46
9: core::char::methods::<impl char>::escape_debug
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/char/methods.rs:461:9
10: <str as core::fmt::Debug>::fmt
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/fmt/mod.rs:2057:23
11: <alloc::string::String as core::fmt::Debug>::fmt
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/alloc/src/string.rs:1966:9
12: <&T as core::fmt::Debug>::fmt
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/fmt/mod.rs:2010:62
13: core::fmt::builders::DebugTuple::field::{{closure}}
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/fmt/builders.rs:345:17
14: core::result::Result<T,E>::and_then
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/result.rs:704:22
15: core::fmt::builders::DebugTuple::field
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/fmt/builders.rs:332:23
16: <core::option::Option<T> as core::fmt::Debug>::fmt
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/option.rs:158:48
17: core::fmt::write
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/fmt/mod.rs:1092:17
18: core::fmt::Write::write_fmt
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/fmt/mod.rs:182:9
19: alloc::fmt::format
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/alloc/src/fmt.rs:578:5
20: cc::Build::getenv
at /home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.67/src/lib.rs:2553:21
21: cc::Build::getenv_unwrap
at /home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.67/src/lib.rs:2559:15
22: cc::Build::get_opt_level
at /home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.67/src/lib.rs:2520:24
23: cc::Build::try_get_compiler
at /home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.67/src/lib.rs:1291:25
24: cc::Build::try_expand
at /home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.67/src/lib.rs:1217:24
25: build_script_main::validate_headers
at ./build/main.rs:138:26
26: build_script_main::find_normal::try_pkg_config
at ./build/find_normal.rs:205:5
27: build_script_main::find_normal::find_openssl_dir
at ./build/find_normal.rs:75:5
28: build_script_main::find_normal::get_openssl::{{closure}}
at ./build/find_normal.rs:15:68
29: core::option::Option<T>::unwrap_or_else
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/option.rs:427:21
30: build_script_main::find_normal::get_openssl
at ./build/find_normal.rs:15:31
31: build_script_main::find_openssl
at ./build/main.rs:55:5
32: build_script_main::main
at ./build/main.rs:63:34
33: core::ops::function::FnOnce::call_once
at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-make v0.32.13`, intermediate artifacts can be found at `/tmp/cargo-installjmgYde`
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Category: This is a bug.Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessBugs identified for the LLVM ICE-breaker groupCritical priorityPerformance or correctness regression from stable to nightly.